public class Undefined
extends java.lang.IllegalArgumentException
Exception thrown when the undefined value is evaluated.
Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
private int |
two |
Constructor and Description |
---|
Undefined(java.lang.String err)
Construct an undefined value from a string, e.g.
|
Undefined(java.lang.String err,
java.lang.Throwable cause)
Construct an undefined value from a string and another exception.
|
Modifier and Type | Method and Description |
---|---|
boolean |
die()
Method used by Frege code to throw exceptions.
|
private int two
static final long serialVersionUID
public Undefined(java.lang.String err)
Prelude.error "you blew it"
err
- description of the errorpublic Undefined(java.lang.String err, java.lang.Throwable cause)
This is used by Frege code to throw any exception catched from
invocation of native functions.
This mechanism avoids throws clauses on frege functions.
err
- cause
- public final boolean die()
An exception from some native method, wrapped in Undefined
can be thrown everywhere without throws
clauses or try ... catch ...
blocks.
This function actually never returns, but we need some return type to make the Frege type checker happy and also to give the code generator a reason to actually invoke this method.