An exception containing arbitrary value.

This class is automatically used for throwing values, which don't extend haxe.Exception or native exception type. For example:

throw "Terrible error";

will be compiled to

throw new ValueException("Terrible error");

Constructor

new(value:Any, ?previous:Exception, ?native:Any)

Variables

read onlyvalue:Any

Thrown value.

Methods

unwrap():Any

Available on cs

Extract an originally thrown value.

This method must return the same value on subsequent calls. Used internally for catching non-native exceptions. Do not override unless you know what you are doing.

Inherited Variables

Defined by Exception

read onlymessage:String

Exception message.

read onlynative:Any

Native exception, which caused this exception.

read onlyprevious:Null<Exception>

Contains an exception, which was passed to previous constructor argument.

read onlystack:CallStack

The call stack at the moment of the exception creation.

Inherited Methods

Defined by Exception

details():String

Detailed exception description.

Includes message, stack and the chain of previous exceptions (if set).

toString():String

Returns exception message.