ExtensibleError

error/ExtensibleError~ ExtensibleError

(abstract) new ExtensibleError(message, dropInternalStackFramesopt)

Source:
Base class of custom error classes, extending the native Error class. This class has been introduced to fix the Babel-related issues with extending the native JavaScript (Error) classes.
Parameters:
Name Type Attributes Default Description
message string The message describing the cause of the error.
dropInternalStackFrames boolean <optional>
true Whether or not the call stack frames referring to the constructors of the custom errors should be excluded from the stack of this error (just like the native platform call stack frames are dropped by the JS engine). This flag is enabled by default.

Extends

  • Error

Members

_dropInternalStackFrames :boolean

Source:
Whether or not the call stack frames referring to the constructors of the custom errors should be excluded from the stack of this error (just like the native platform call stack frames are dropped by the JS engine).
Type:
  • boolean

_nativeError :Error

Source:
Native error instance we use to generate the call stack. For some reason some browsers do not generate call stacks for instances of classes extending the native Error class, so we bypass this shortcoming this way.
Type:
  • Error

(nullable) _stack :string

Source:
The internal cache of the generated stack. The cache is filled upon first access to the stack property.
Type:
  • string

message :string

Source:
The message describing the cause of the error.
Type:
  • string

name :string

Source:
The name of this error, used in the generated stack trace.
Type:
  • string