Class ThrowableCaster
java.lang.Object
ortus.boxlang.runtime.dynamic.casters.ThrowableCaster
- All Implemented Interfaces:
IBoxCaster
I handle casting anything to a Throwable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CastAttempt<Throwable> Tests to see if the value can be cast to a Throwable.static ThrowableUsed to cast anything to a Throwable, throwing exception if we failstatic ThrowableUsed to cast anything to a Throwable
-
Constructor Details
-
ThrowableCaster
public ThrowableCaster()
-
-
Method Details
-
attempt
Tests to see if the value can be cast to a Throwable. Returns aCastAttempt<T>which will contain the result if casting was was successfull, or can be interogated to proceed otherwise.- Parameters:
object- The value to cast to a Throwable- Returns:
- The Throwable value
-
cast
Used to cast anything to a Throwable, throwing exception if we fail- Parameters:
object- The value to cast to a Throwable- Returns:
- The Throwable value
-
cast
Used to cast anything to a Throwable- Parameters:
object- The value to cast to a Throwablefail- True to throw exception when failing.- Returns:
- The Throwable value
-