Unavailable Information
rascal-0.41.2
Synopsis
Requested information is unavailable at runtime
Types
data RuntimeException = UnavailableInformation(str message);
Usage
import Exception; (only needed when UnavailableInformation is used in catch)
Description
Several datetypes may contain optional information that is not always available:
- In a datetime value the date or the time may be missing.
- In a location value, various fields are optional,
e.g.,
port,offset,beginandend.
This exception is thrown when optional information is not available.
Examples
rascal>$2016-09-14$.hour;
|prompt:///|(0,12,<1,0>,<1,12>): Can not retrieve the hour on a date value
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UnsupportedOperation|
rascal>someLoc = |home:///abc.txt|;
loc: |home:///abc.txt|
rascal>someLoc.offset;
|prompt:///|(0,7,<1,0>,<1,7>): UnavailableInformation()
at $(|prompt:///|(0,15,<1,0>,<1,15>))