Invalid Use Of Time
rascal-0.34.0
Synopsis
Invalid use of a time value at runtime
Types
data RuntimeException = InvalidUseOfTime(str message);
Usage
import Exception;
(only needed when InvalidUseOfTime
is used in catch
)
Description
Thrown by operations on time values that try to update unavailable information.
Examples
Setting the year
field on a time value throws an exception:
rascal>NOW = $T20:11:01.463+00:00$;
|prompt:///|(6,21,<1,6>,<1,27>): Invalid datetime input: Error reading time, expected ':', found: 49
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/DateTimeSyntax|
ok
rascal>NOW.year = 2020;
|prompt:///|(0,3,<1,0>,<1,3>): Undeclared variable: NOW
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UndeclaredVariable|
ok
NOTE: Exception is not shown properly