Class Errors

java.lang.Object
com.oracle.truffle.js.runtime.Errors

public final class Errors extends Object
Utility class to to create all kinds of ECMAScript-defined Error Objects.
  • Method Details

    • createAggregateError

      public static JSException createAggregateError(Object errors, String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createAggregateError

      public static JSException createAggregateError(Object errors, com.oracle.truffle.api.nodes.Node originatingNode)
    • createError

      public static JSException createError(String message)
    • createEvalError

      public static JSException createEvalError(String message)
    • createRangeError

      public static JSException createRangeError(String message)
    • createRangeError

      public static JSException createRangeError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorFormat

      public static JSException createRangeErrorFormat(String message, com.oracle.truffle.api.nodes.Node originatingNode, Object... args)
    • createURIError

      public static JSException createURIError(String message)
    • createTypeError

      public static JSException createTypeError(String message)
    • createTypeErrorFormat

      public static JSException createTypeErrorFormat(String message, Object... args)
    • createTypeError

      public static JSException createTypeError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeError

      public static JSException createTypeError(String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotMixBigIntWithOtherTypes

      public static JSException createTypeErrorCannotMixBigIntWithOtherTypes(com.oracle.truffle.api.nodes.Node originatingNode)
    • createErrorCannotConvertToBigInt

      public static JSException createErrorCannotConvertToBigInt(JSErrorType type, Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotConvertBigIntToNumber

      public static JSException createTypeErrorCannotConvertBigIntToNumber(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotAFunction

      public static JSException createTypeErrorNotAFunction(Object functionObj)
    • createTypeErrorNotAFunction

      public static JSException createTypeErrorNotAFunction(Object functionObj, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotAConstructor

      public static JSException createTypeErrorNotAConstructor(Object object, JSContext context)
    • createTypeErrorNotAConstructor

      public static JSException createTypeErrorNotAConstructor(Object object, com.oracle.truffle.api.nodes.Node originatingNode, JSContext context)
    • createTypeErrorTypeXExpected

      public static JSException createTypeErrorTypeXExpected(Object type)
    • createTypeErrorCalledOnNonObject

      public static JSException createTypeErrorCalledOnNonObject()
    • createTypeErrorMethodCalledOnNonObjectOrWrongType

      public static JSException createTypeErrorMethodCalledOnNonObjectOrWrongType(String method)
    • createTypeErrorSegmenterExpected

      public static JSException createTypeErrorSegmenterExpected()
    • createTypeErrorSegmentsExpected

      public static JSException createTypeErrorSegmentsExpected()
    • createTypeErrorDisplayNamesExpected

      public static JSException createTypeErrorDisplayNamesExpected()
    • createTypeErrorLocaleExpected

      public static JSException createTypeErrorLocaleExpected()
    • createTypeErrorNoOverloadFoundUnary

      public static JSException createTypeErrorNoOverloadFoundUnary(com.oracle.truffle.api.strings.TruffleString operatorName, Object operand, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNoOverloadFoundBinary

      public static JSException createTypeErrorNoOverloadFoundBinary(com.oracle.truffle.api.strings.TruffleString operatorName, Object left, Object right, com.oracle.truffle.api.nodes.Node originatingNode)
    • createSyntaxError

      public static JSException createSyntaxError(ParserException cause, JSContext context)
    • createSyntaxError

      public static JSException createSyntaxError(String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createSyntaxError

      public static JSException createSyntaxError(String message)
    • createSyntaxError

      public static JSException createSyntaxError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createSyntaxErrorFormat

      public static JSException createSyntaxErrorFormat(String message, com.oracle.truffle.api.nodes.Node originatingNode, Object... args)
    • createSyntaxError

      public static JSException createSyntaxError(String message, Throwable cause, com.oracle.truffle.api.source.SourceSection sourceLocation, boolean isIncompleteSource)
    • createSyntaxErrorVariableAlreadyDeclared

      public static JSException createSyntaxErrorVariableAlreadyDeclared(com.oracle.truffle.api.strings.TruffleString varName, com.oracle.truffle.api.nodes.Node originatingNode)
    • createReferenceError

      public static JSException createReferenceError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createReferenceError

      public static JSException createReferenceError(String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createReferenceError

      public static JSException createReferenceError(String message)
    • createReferenceError

      public static JSException createReferenceError(String message, com.oracle.truffle.api.source.SourceSection sourceLocation)
    • createReferenceErrorDerivedConstructorThisNotInitialized

      public static JSException createReferenceErrorDerivedConstructorThisNotInitialized(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorDerivedConstructorReturnedIllegalType

      public static JSException createTypeErrorDerivedConstructorReturnedIllegalType(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorClassConstructorRequiresNew

      public static JSException createTypeErrorClassConstructorRequiresNew(com.oracle.truffle.api.strings.TruffleString className, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotObjectCoercible

      public static JSException createTypeErrorNotObjectCoercible(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotAnObject

      public static JSException createTypeErrorNotAnObject(Object value)
    • createTypeErrorNotAnObject

      public static JSException createTypeErrorNotAnObject(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorIterResultNotAnObject

      public static JSException createTypeErrorIterResultNotAnObject(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotIterable

      public static JSException createTypeErrorNotIterable(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotIterator

      public static JSException createTypeErrorNotIterator(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorPropertyDescriptorNotAnObject

      public static JSException createTypeErrorPropertyDescriptorNotAnObject(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorInvalidPrototype

      public static JSException createTypeErrorInvalidPrototype(Object value)
    • createTypeErrorInvalidInstanceofTarget

      public static JSException createTypeErrorInvalidInstanceofTarget(Object target, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotConvertToPrimitiveValue

      public static JSException createTypeErrorCannotConvertToPrimitiveValue()
    • createTypeErrorCannotConvertToPrimitiveValue

      public static JSException createTypeErrorCannotConvertToPrimitiveValue(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotConvertToString

      public static JSException createTypeErrorCannotConvertToString(String what)
    • createTypeErrorCannotConvertToString

      public static JSException createTypeErrorCannotConvertToString(String what, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotConvertToNumber

      public static JSException createTypeErrorCannotConvertToNumber(String what)
    • createTypeErrorCannotConvertToNumber

      public static JSException createTypeErrorCannotConvertToNumber(String what, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorIncompatibleReceiver

      public static JSException createTypeErrorIncompatibleReceiver(com.oracle.truffle.api.strings.TruffleString methodName, Object receiver)
    • createTypeErrorIncompatibleReceiver

      public static JSException createTypeErrorIncompatibleReceiver(String methodName, Object receiver)
    • createTypeErrorIncompatibleReceiver

      public static JSException createTypeErrorIncompatibleReceiver(Object what)
    • createTypeErrorCannotSetProto

      public static JSException createTypeErrorCannotSetProto(JSDynamicObject thisObj, JSDynamicObject proto)
    • createTypeErrorNotWritableProperty

      public static JSException createTypeErrorNotWritableProperty(Object key, Object thisObj, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorNotWritableProperty

      public static JSException createTypeErrorNotWritableProperty(long index, Object thisObj, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorLengthNotWritable

      public static JSException createTypeErrorLengthNotWritable()
    • createTypeErrorNotConfigurableProperty

      public static JSException createTypeErrorNotConfigurableProperty(Object key)
    • createTypeErrorNotExtensible

      public static JSException createTypeErrorNotExtensible(JSDynamicObject thisObj, Object key)
    • createTypeErrorSetNonObjectReceiver

      public static JSException createTypeErrorSetNonObjectReceiver(Object receiver, Object key)
    • createTypeErrorConstReassignment

      public static JSException createTypeErrorConstReassignment(Object key, com.oracle.truffle.api.nodes.Node originatingNode)
    • createReferenceErrorNotDefined

      public static JSException createReferenceErrorNotDefined(Object key, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotRedefineProperty

      public static JSException createTypeErrorCannotRedefineProperty(Object key)
    • createTypeErrorCannotRedefineProperty

      public static JSException createTypeErrorCannotRedefineProperty(long index)
    • createTypeErrorCannotRedefineTypedArrayElement

      public static JSException createTypeErrorCannotRedefineTypedArrayElement()
    • createTypeErrorCannotSetProperty

      public static JSException createTypeErrorCannotSetProperty(Object keyOrIndex, Object object, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotSetAccessorProperty

      public static JSException createTypeErrorCannotSetAccessorProperty(Object key, JSDynamicObject store, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotGetAccessorProperty

      public static JSException createTypeErrorCannotGetAccessorProperty(Object key, JSDynamicObject store, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotGetProperty

      public static JSException createTypeErrorCannotGetProperty(Object keyOrIndex, Object object, boolean isGetMethod, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotDeclareGlobalFunction

      public static JSException createTypeErrorCannotDeclareGlobalFunction(Object varName, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorCurrencyNotWellFormed

      public static JSException createRangeErrorCurrencyNotWellFormed(String currencyCode)
    • createRangeErrorInvalidUnitArgument

      public static JSException createRangeErrorInvalidUnitArgument(String functionName, Object unit)
    • createRangeErrorInvalidLanguageId

      public static JSException createRangeErrorInvalidLanguageId(String languageId)
    • createRangeErrorInvalidLanguageSubtag

      public static JSException createRangeErrorInvalidLanguageSubtag(String language)
    • createRangeErrorInvalidVariant

      public static JSException createRangeErrorInvalidVariant(String variant)
    • createRangeErrorInvalidRegion

      public static JSException createRangeErrorInvalidRegion(String region)
    • createRangeErrorInvalidScript

      public static JSException createRangeErrorInvalidScript(String script)
    • createRangeErrorInvalidCalendar

      public static JSException createRangeErrorInvalidCalendar(String calendar)
    • createRangeErrorInvalidDateTimeField

      public static JSException createRangeErrorInvalidDateTimeField(String dateTimeField)
    • createRangeErrorInvalidUnitIdentifier

      public static JSException createRangeErrorInvalidUnitIdentifier(String unitIdentifier)
    • createRangeErrorInvalidTimeValue

      public static JSException createRangeErrorInvalidTimeValue()
    • createTypeErrorInvalidTimeValue

      public static JSException createTypeErrorInvalidTimeValue()
    • createTypeErrorMapExpected

      public static JSException createTypeErrorMapExpected()
    • createTypeErrorSetExpected

      public static JSException createTypeErrorSetExpected()
    • createTypeErrorOutOfBoundsTypedArray

      public static JSException createTypeErrorOutOfBoundsTypedArray()
    • createTypeErrorDetachedBuffer

      public static JSException createTypeErrorDetachedBuffer()
    • createTypeErrorInvalidDetachKey

      public static JSException createTypeErrorInvalidDetachKey()
    • createTypeErrorReadOnlyBuffer

      public static JSException createTypeErrorReadOnlyBuffer()
    • createTypeErrorArrayBufferExpected

      public static JSException createTypeErrorArrayBufferExpected()
    • createTypeErrorSharedArrayBufferExpected

      public static JSException createTypeErrorSharedArrayBufferExpected()
    • createTypeErrorArrayBufferViewExpected

      public static JSException createTypeErrorArrayBufferViewExpected()
    • createTypeErrorUint8ArrayExpected

      public static JSException createTypeErrorUint8ArrayExpected()
    • createTypeErrorCallableExpected

      public static JSException createTypeErrorCallableExpected()
    • createTypeErrorGeneratorObjectExpected

      public static JSException createTypeErrorGeneratorObjectExpected()
    • createTypeErrorAsyncGeneratorObjectExpected

      public static JSException createTypeErrorAsyncGeneratorObjectExpected()
    • createTypeErrorNotADataView

      public static JSException createTypeErrorNotADataView()
    • createTypeErrorNotADate

      public static JSException createTypeErrorNotADate()
    • createTypeErrorFinalizationRegistryExpected

      public static JSException createTypeErrorFinalizationRegistryExpected()
    • createTypeErrorNotANumber

      public static JSException createTypeErrorNotANumber(Object value)
    • createTypeErrorNotAString

      public static JSException createTypeErrorNotAString(Object value)
    • createTypeErrorNotARegExp

      public static JSException createTypeErrorNotARegExp(Object value)
    • createTypeErrorGlobalObjectNotExtensible

      public static JSException createTypeErrorGlobalObjectNotExtensible(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorTooManyArguments

      public static JSException createRangeErrorTooManyArguments()
    • createRangeErrorBigIntMaxSizeExceeded

      public static JSException createRangeErrorBigIntMaxSizeExceeded()
    • createRangeErrorStackOverflow

      public static JSException createRangeErrorStackOverflow()
    • createRangeErrorStackOverflow

      public static JSException createRangeErrorStackOverflow(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorInvalidStringLength

      public static JSException createRangeErrorInvalidStringLength()
    • createRangeErrorInvalidStringLength

      public static JSException createRangeErrorInvalidStringLength(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorInvalidArrayLength

      public static JSException createRangeErrorInvalidArrayLength(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorInvalidArrayLength

      public static JSException createRangeErrorInvalidArrayLength()
    • createRangeErrorIndexNegative

      public static JSException createRangeErrorIndexNegative(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorIndexTooLarge

      public static JSException createRangeErrorIndexTooLarge(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorIndexTooLarge

      public static JSException createTypeErrorIndexTooLarge()
    • createRangeErrorInvalidBufferSize

      public static JSException createRangeErrorInvalidBufferSize()
    • createRangeErrorInvalidBufferOffset

      public static JSException createRangeErrorInvalidBufferOffset()
    • createRangeErrorInvalidDuration

      public static JSException createRangeErrorInvalidDuration(com.oracle.truffle.api.nodes.Node originatingNode, Object duration)
    • createRangeErrorInvalidOptions

      public static JSException createRangeErrorInvalidOptions(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorInvalidTimeZone

      public static JSException createRangeErrorInvalidTimeZone(String timeZoneName)
    • unsupported

      public static RuntimeException unsupported(String message)
    • notImplemented

      public static RuntimeException notImplemented(String message)
    • shouldNotReachHere

      public static RuntimeException shouldNotReachHere()
    • shouldNotReachHere

      public static RuntimeException shouldNotReachHere(String message)
    • shouldNotReachHere

      public static RuntimeException shouldNotReachHere(Throwable exception)
    • shouldNotReachHereUnexpectedValue

      public static RuntimeException shouldNotReachHereUnexpectedValue(Object value)
    • outOfMemoryError

      public static OutOfMemoryError outOfMemoryError()
    • createTypeErrorConfigurableExpected

      public static JSException createTypeErrorConfigurableExpected()
    • createTypeErrorSameResultExpected

      public static JSException createTypeErrorSameResultExpected()
    • createTypeErrorYieldStarThrowMethodMissing

      public static JSException createTypeErrorYieldStarThrowMethodMissing(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotDeletePropertyOf

      public static JSException createTypeErrorCannotDeletePropertyOf(Object key, Object object)
    • createTypeErrorCannotDeletePropertyOfSealedArray

      public static JSException createTypeErrorCannotDeletePropertyOfSealedArray(long index)
    • createTypeErrorJSObjectExpected

      public static JSException createTypeErrorJSObjectExpected()
    • createTypeErrorPrivateSymbolInProxy

      public static JSException createTypeErrorPrivateSymbolInProxy()
    • createTypeErrorPrivateSymbolInProxy

      public static JSException createTypeErrorPrivateSymbolInProxy(com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorTrapReturnedFalsish

      public static JSException createTypeErrorTrapReturnedFalsish(Object trap, Object propertyKey)
    • createTypeErrorOwnKeysTrapMissingKey

      public static JSException createTypeErrorOwnKeysTrapMissingKey(Object propertyKey)
    • createTypeErrorProxyRevoked

      public static JSException createTypeErrorProxyRevoked(com.oracle.truffle.api.strings.TruffleString trap, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorProxyRevoked

      public static JSException createTypeErrorProxyRevoked()
    • createTypeErrorProxyTargetNotExtensible

      public static JSException createTypeErrorProxyTargetNotExtensible()
    • createTypeErrorProxyGetInvariantViolated

      public static JSException createTypeErrorProxyGetInvariantViolated(Object propertyKey, Object expectedValue, Object actualValue)
    • createTypeErrorInteropException

      public static JSException createTypeErrorInteropException(Object receiver, com.oracle.truffle.api.interop.InteropException cause, String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorInteropException

      public static JSException createTypeErrorInteropException(Object receiver, com.oracle.truffle.api.interop.InteropException cause, String message, Object messageDetails, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorUnboxException

      public static JSException createTypeErrorUnboxException(Object receiver, com.oracle.truffle.api.interop.InteropException cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorUnsupportedInteropType

      public static JSException createTypeErrorUnsupportedInteropType(Object value)
    • createTypeErrorNotATruffleObject

      public static JSException createTypeErrorNotATruffleObject(String message)
    • createTypeErrorInvalidIdentifier

      public static JSException createTypeErrorInvalidIdentifier(Object identifier)
    • createTypeErrorClassNotFound

      public static JSException createTypeErrorClassNotFound(Object className)
    • createNotAFileError

      public static JSException createNotAFileError(String path)
    • createErrorFromException

      public static JSException createErrorFromException(Throwable e)
    • createError

      public static JSException createError(String message, Throwable e)
    • createICU4JDataError

      public static JSException createICU4JDataError(Exception e)
    • createEvalDisabled

      public static JSException createEvalDisabled()
    • createTypeErrorIteratorResultNotObject

      public static JSException createTypeErrorIteratorResultNotObject(Object value, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotGetPrivateMember

      public static JSException createTypeErrorCannotGetPrivateMember(boolean fieldAccess, com.oracle.truffle.api.strings.TruffleString name, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotSetPrivateMember

      public static JSException createTypeErrorCannotSetPrivateMember(Object name, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorCannotAddPrivateMember

      public static JSException createTypeErrorCannotAddPrivateMember(String name, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeError

      public static JSException createTypeError(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeError

      public static JSException createRangeError(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeError

      public static JSException createRangeError(String message, Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createCompileError

      public static JSException createCompileError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createCompileError

      public static JSException createCompileError(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createLinkError

      public static JSException createLinkError(String message)
    • createLinkError

      public static JSException createLinkError(String message, com.oracle.truffle.api.nodes.Node originatingNode)
    • createLinkError

      public static JSException createLinkError(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createRuntimeError

      public static JSException createRuntimeError(String message, JSRealm realm)
    • createRuntimeError

      public static JSException createRuntimeError(Throwable cause, com.oracle.truffle.api.nodes.Node originatingNode)
    • createTypeErrorWrongDecoratorReturn

      public static JSException createTypeErrorWrongDecoratorReturn(com.oracle.truffle.api.nodes.Node originatingNode)
    • createRangeErrorEncodingNotSupported

      public static JSException createRangeErrorEncodingNotSupported(com.oracle.truffle.api.strings.TruffleString encoding)