public class OCamlException extends java.lang.RuntimeException
OCamlException class is the parent class of all wrapped
OCaml exceptions, also acting as a fallback cases for when the wrapped
exception cannot be precisely mapped.| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
SLOT
Identifier for
OCamlException. |
| Constructor and Description |
|---|
OCamlException(org.ocamljava.runtime.kernel.Fail.Exception fe)
Constructs a new instance from an exception.
|
OCamlException(org.ocamljava.runtime.values.Value v)
Constructs a new instance from a value.
|
| Modifier and Type | Method and Description |
|---|---|
org.ocamljava.runtime.kernel.Fail.Exception |
getFailException()
Returns the underlying exception.
|
java.lang.String |
getOCamlName()
Returns the name (that acts as an identifier) of the underlying exception.
|
java.lang.String |
getOCamlStringRepresentation()
Returns the string representation of the underlying exception.
|
static void |
register(java.lang.String id,
java.lang.Class<?> cl)
Registers an exception in the context.
|
java.lang.String |
toString() |
static OCamlException |
wrap(org.ocamljava.runtime.kernel.Fail.Exception fe)
Wraps a
Fail.Exception exception into a OCamlException one,
using the map of registered exceptions. |
public static final java.lang.Object SLOT
OCamlException.public OCamlException(org.ocamljava.runtime.kernel.Fail.Exception fe)
fe - exception to build instance from - should not be nullpublic OCamlException(org.ocamljava.runtime.values.Value v)
OCamlException(new Fail.Exception(v))v - value to build instance from - should not be nullpublic final org.ocamljava.runtime.kernel.Fail.Exception getFailException()
public final java.lang.String getOCamlName()
public final java.lang.String getOCamlStringRepresentation()
public final java.lang.String toString()
toString in class java.lang.Throwablepublic static OCamlException wrap(org.ocamljava.runtime.kernel.Fail.Exception fe)
Fail.Exception exception into a OCamlException one,
using the map of registered exceptions.fe - exception to wrap - should not be nullOCamlException instance wrapping the passed exceptionpublic static void register(java.lang.String id, java.lang.Class<?> cl)
(Fail.Exception).id - exception identifier - should not be nullcl - class of exception to register - should not be null