Skip to content

Errors: UseRouteInvalidError

An error thrown when there is a mismatch between an expected route and the one actually used.

Extends

  • Error

Constructors

new UseRouteInvalidError()

ts
new UseRouteInvalidError(routeName, actualRouteName): UseRouteInvalidError

Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names. This detailed error message aids in quickly identifying and resolving mismatches in route usage.

Parameters

ParameterTypeDescription
routeNamestringThe route name that was incorrectly used.
actualRouteNamestringThe expected route name that should have been used.

Returns

UseRouteInvalidError

Overrides

Error.constructor

Methods

captureStackTrace()

ts
static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Properties

PropertyModifierTypeDescriptionInherited from
cause?publicunknown-Error.cause
messagepublicstring-Error.message
namepublicstring-Error.name
stack?publicstring-Error.stack
prepareStackTrace?static(err: Error, stackTraces: CallSite[]) => anyOptional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-tracesError.prepareStackTrace
stackTraceLimitstaticnumber-Error.stackTraceLimit