Class UnsupportedTypeException
- All Implemented Interfaces:
Serializable
TruffleObject
does not support the type of one or more
arguments.- Since:
- 0.11
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic UnsupportedTypeException
Creates anUnsupportedTypeException
to indicate that an argument type is not supported.static UnsupportedTypeException
Creates anUnsupportedTypeException
to indicate that an argument type is not supported.static UnsupportedTypeException
Creates anUnsupportedTypeException
to indicate that an argument type is not supported.Object[]
Returns the arguments of the foreign object access that were not supported by theTruffleObject
.Methods inherited from class com.oracle.truffle.api.interop.InteropException
fillInStackTrace, getCause, initCause
Methods inherited from class java.lang.Throwable
addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getSuppliedValues
Returns the arguments of the foreign object access that were not supported by theTruffleObject
.- Returns:
- the unsupported arguments
- Since:
- 0.11
-
create
Creates anUnsupportedTypeException
to indicate that an argument type is not supported.- Since:
- 19.0
-
create
Creates anUnsupportedTypeException
to indicate that an argument type is not supported.- Since:
- 19.0
-
create
public static UnsupportedTypeException create(Object[] suppliedValues, String hint, Throwable cause) Creates anUnsupportedTypeException
to indicate that an argument type is not supported.In addition a cause may be provided. The cause should only be set if the guest language code caused this problem. An example for this is a language specific proxy mechanism that invokes guest language code to describe an object. If the guest language code fails to execute and this interop exception is a valid interpretation of the error, then the error should be provided as cause. The cause can then be used by the source language as new exception cause if the
InteropException
is translated to a source language error. If theInteropException
is discarded, then the cause will most likely get discarded by the source language as well. Note that the cause must be of typeAbstractTruffleException
otherwise anIllegalArgumentException
is thrown.This method is designed to be used in
compiled
code paths.- Parameters:
cause
- the guest language exception that caused the error.- Since:
- 20.2
-