API Reference
Rockets Core API
nestjs-exception
classes
RuntimeException

Class: RuntimeException

Extends

  • Error

Implements

Constructors

new RuntimeException()

new RuntimeException(message?, options?): RuntimeException

Parameters

ParameterType
message?string
options?Omit<RuntimeExceptionOptions, "message">

Returns

RuntimeException

Overrides

Error.constructor

Defined in

.tmp/repos/rockets/packages/nestjs-exception/src/exceptions/runtime.exception.ts:17 (opens in a new tab)

new RuntimeException()

new RuntimeException(options?): RuntimeException

Parameters

ParameterType
options?RuntimeExceptionOptions

Returns

RuntimeException

Overrides

Error.constructor

Defined in

.tmp/repos/rockets/packages/nestjs-exception/src/exceptions/runtime.exception.ts:21 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
contextpublicRuntimeExceptionContext{}Additional context-
messagepublicstringundefined-RuntimeExceptionInterface.message Error.message
namepublicstringundefined-RuntimeExceptionInterface.name Error.name
stack?publicstringundefined-RuntimeExceptionInterface.stack Error.stack
prepareStackTrace?static(err: Error, stackTraces: CallSite[]) => anyundefinedOptional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-traces (opens in a new tab)Error.prepareStackTrace
stackTraceLimitstaticnumberundefined-Error.stackTraceLimit

Accessors

errorCode

get errorCode(): string

The error code.

set errorCode(v): void

The error code.

Parameters

ParameterType
vstring

Returns

string

Implementation of

RuntimeExceptionInterface.errorCode

Defined in

.tmp/repos/rockets/packages/nestjs-exception/src/exceptions/runtime.exception.ts:68 (opens in a new tab)


httpStatus

get httpStatus(): HttpStatus

Optional HTTP status code to use only when this exception is sent over an HTTP service.

Please consider this to be a hint for API error responses.

Returns

HttpStatus

Implementation of

RuntimeExceptionInterface.httpStatus

Defined in

.tmp/repos/rockets/packages/nestjs-exception/src/exceptions/runtime.exception.ts:76 (opens in a new tab)


safeMessage

get safeMessage(): undefined | string

If set, this message will be used on responses instead of message.

Use this when the main message might expose

Returns

undefined | string

Implementation of

RuntimeExceptionInterface.safeMessage

Defined in

.tmp/repos/rockets/packages/nestjs-exception/src/exceptions/runtime.exception.ts:80 (opens in a new tab)

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

.tmp/repos/rockets/node_modules/@types/node/globals.d.ts:4