Skip to content

Class: RuntimeException

Extends

  • Exception

Constructors

Constructor

ts
new RuntimeException(message?: string, options?: ErrorOptions & {
  code: string;
  status: number;
}): RuntimeException;

Parameters

ParameterType
message?string
options?ErrorOptions & { code: string; status: number; }

Returns

RuntimeException

Inherited from

ts
Exception.constructor;

Properties

PropertyModifierTypeDescriptionOverridesInherited from
cause?publicunknown--Exception.cause
code?publicstringA machine readable error code. This will allow the error handling logic to narrow down exceptions based upon the error code.-Exception.code
help?publicstringOptional help description for the error. You can use it to define additional human readable information for the error.-Exception.help
messagepublicstring--Exception.message
namepublicstringName of the class that raised the exception.-Exception.name
stack?publicstring--Exception.stack
statuspublicnumberA status code for the error. Usually helpful when converting errors to HTTP responses.-Exception.status
codestaticstring-Exception.code-
help?staticstringDefine the error metadata as static properties to avoid setting them repeatedly on the error instance-Exception.help
message?staticstring--Exception.message
prepareStackTrace?static(err: Error, stackTraces: CallSite[]) => anyOptional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-traces-Exception.prepareStackTrace
stackTraceLimitstaticnumber--Exception.stackTraceLimit
statusstaticnumber-Exception.status-

Accessors

[toStringTag]

Get Signature

ts
get toStringTag: string;
Returns

string

Inherited from

ts
Exception.[toStringTag]

Methods

toString()

ts
toString(): string;

Returns a string representation of an object.

Returns

string

Inherited from

ts
Exception.toString;

captureStackTrace()

ts
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

ts
Exception.captureStackTrace;