MethodNotImplementedError class

Extends

Devralınan Özellikler

correlationId
error
errorCodes
errorDescription
message
name
stack
stackTraceLimit

Bu özellik, Error.stackTraceLimit bir yığın izi tarafından toplanan yığın çerçeve sayısını (ister tarafından new Error().stack oluşturulmuş olsun) Error.captureStackTrace(obj)belirtir.

Varsayılan değer 10 ise herhangi bir geçerli JavaScript numarasına ayarlanabilir. Değişiklikler, değer değiştirildikten sonra yakalanan tüm yığın izlerini etkiler.

Eğer sayı olmayan bir değere veya negatif bir saya ayarlanırsa, stack izleri hiçbir kare yakalamaz.

subError

Devralınan Yöntemler

captureStackTrace(object, Function)

Üzerinde .stackbir targetObject özellik oluşturur ve erişildiğinde, çağrılan koddaki Error.captureStackTrace() konumu temsil eden bir diziyi döndürür.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

İzin ilk satırına ön ekler eklenecek ${myObject.name}: ${myObject.message}.

Isteğe bağlı constructorOpt argüman bir fonksiyonu kabul eder. Verildiyse, , constructorOptdahil, üzerindeki constructorOpttüm kareler üretilen yığın izinden çıkarılacaktır.

Bu argüman constructorOpt , hata oluşturma uygulama detaylarını kullanıcıdan gizlemek için faydalıdır. Örneğin:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
prepareStackTrace(Error, CallSite[])

Bkz. https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Oluşturucu Ayrıntıları

MethodNotImplementedError(string, string)

new MethodNotImplementedError(method: string, correlationId?: string)

Parametreler

method

string

correlationId

string

Devralınan Özellik Detayları

correlationId

correlationId?: string

Özellik Değeri

string

CustomAuthError.correlationId'denDevralındı

error

error: string

Özellik Değeri

string

CustomAuthError.error'danDevralındı

errorCodes

errorCodes?: number[]

Özellik Değeri

number[]

CustomAuthError.errorCodes'tanDevralındı

errorDescription

errorDescription?: string

Özellik Değeri

string

CustomAuthError.errorDescription'danDevralındı

message

message: string

Özellik Değeri

string

CustomAuthError.message'danDevralındı

name

name: string

Özellik Değeri

string

CustomAuthError.name Devralındı

stack

stack?: string

Özellik Değeri

string

CustomAuthError.stack'tenDevralındı

stackTraceLimit

Bu özellik, Error.stackTraceLimit bir yığın izi tarafından toplanan yığın çerçeve sayısını (ister tarafından new Error().stack oluşturulmuş olsun) Error.captureStackTrace(obj)belirtir.

Varsayılan değer 10 ise herhangi bir geçerli JavaScript numarasına ayarlanabilir. Değişiklikler, değer değiştirildikten sonra yakalanan tüm yığın izlerini etkiler.

Eğer sayı olmayan bir değere veya negatif bir saya ayarlanırsa, stack izleri hiçbir kare yakalamaz.

static stackTraceLimit: number

Özellik Değeri

number

CustomAuthError.stackTraceLimit'tenDevralındı

subError

subError?: string

Özellik Değeri

string

CustomAuthError.subError'danDevralındı

Devralınan Yöntemin Ayrıntıları

captureStackTrace(object, Function)

Üzerinde .stackbir targetObject özellik oluşturur ve erişildiğinde, çağrılan koddaki Error.captureStackTrace() konumu temsil eden bir diziyi döndürür.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

İzin ilk satırına ön ekler eklenecek ${myObject.name}: ${myObject.message}.

Isteğe bağlı constructorOpt argüman bir fonksiyonu kabul eder. Verildiyse, , constructorOptdahil, üzerindeki constructorOpttüm kareler üretilen yığın izinden çıkarılacaktır.

Bu argüman constructorOpt , hata oluşturma uygulama detaylarını kullanıcıdan gizlemek için faydalıdır. Örneğin:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
static function captureStackTrace(targetObject: object, constructorOpt?: Function)

Parametreler

targetObject

object

constructorOpt

Function

CustomAuthError.captureStackTrace'danDevralındı

prepareStackTrace(Error, CallSite[])

Bkz. https://v8.dev/docs/stack-trace-api#customizing-stack-traces

static function prepareStackTrace(err: Error, stackTraces: CallSite[]): any

Parametreler

err

Error

stackTraces

CallSite[]

Döndürülenler

any

CustomAuthError.prepareStackTrace'danDevralındı