Class: NotAllowedError
Thrown by not allowed operations such as in name formatting.
For example, this will occur when trying to format a name accordingly using a non-supported key.
Extends
Constructors
Constructor
new NotAllowedError(
error):NotAllowedError
Creates a new NotAllowedError with an optional error message and the
operation name.
For example, an error of this kind can be interpreted as: "NotAllowedError (stringName)", "NotAllowedError (stringName) - operationName", "NotAllowedError (stringName) - operationName: message"
Parameters
error
ErrorMessage & object
Returns
NotAllowedError
Overrides
Properties
cause?
optionalcause?:unknown
Inherited from
message
message:
string
Inherited from
name
name:
string
Inherited from
operation
readonlyoperation:string
The revoked operation name.
source
readonlysource:string|string[]
Inherited from
stack?
optionalstack?:string
Inherited from
type
readonlytype:NameErrorType
Inherited from
Accessors
hasMessage
Get Signature
get hasMessage():
boolean
Whether a message describing the failure exists.
Returns
boolean
Inherited from
sourceAsString
Get Signature
get sourceAsString():
string
The actual source input which caused the error.
Returns
string
Inherited from
Methods
toString()
toString():
string
Returns a string representation of the error.
Returns
string