VoiceLiveAuthenticationError class

فئة خطأ المصادقة لعمليات الصوت المباشر

يمتد

الخصائص الموروثة

cause

الخطأ الأصلي الذي تسبب في هذا الخطأ، إن وجد

code

رمز الخطأ يحدد نوع الخطأ المحدد

context

معلومات السياق حول مكان حدوث الخطأ

message
name
recoverable

يشير إلى ما إذا كان هذا الخطأ قابلا للاسترجاع

stack
stackTraceLimit

تحدد الخاصية Error.stackTraceLimit عدد إطارات المكدس التي جمعها تتبع المكدس (سواء تم توليدها بواسطة new Error().stack أو Error.captureStackTrace(obj)).

القيمة الافتراضية هي 10 ولكن يمكن تعيينها على أي رقم جافاسكريبت صالح. التغييرات ستؤثر على أي تتبع مكدس يتم التقاطه بعد تغيير القيمة.

إذا تم ضبطها على قيمة غير رقمية، أو على رقم سالب، فلن تلتقط مسارات المكدس أي إطارات.

timestamp

الطابع الزمني عند حدوث الخطأ

الأساليب المتوارثة

captureStackTrace(object, Function)

ينشئ خاصية .stack على targetObject، والتي عند الوصول إليها تعيد سلسلة تمثل الموقع في الكود الذي Error.captureStackTrace() تم استدعاء عنده.

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

السطر الأول من المسار سيسبق ب ${myObject.name}: ${myObject.message}.

الوسيط الاختياري constructorOpt يقبل دالة. إذا تم إعطاؤها، حذف جميع الإطارات أعلاه constructorOpt، بما في ذلك constructorOpt، من تتبع المكدس المولد.

الحجة constructorOpt مفيدة لإخفاء تفاصيل تنفيذ توليد الأخطاء عن المستخدم. على سبيل المثال،

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[])

راجع https://v8.dev/docs/stack-trace-api#customizing-stack-traces

تفاصيل المنشئ

VoiceLiveAuthenticationError(string, string, Error)

new VoiceLiveAuthenticationError(message: string, code: string, cause?: Error)

المعلمات

message

string

code

string

cause

Error

تفاصيل الخاصية الموروثة

cause

الخطأ الأصلي الذي تسبب في هذا الخطأ، إن وجد

cause?: Error

قيمة الخاصية

Error

موروث منVoiceLiveConnectionError.cause

code

رمز الخطأ يحدد نوع الخطأ المحدد

code: string

قيمة الخاصية

string

موروث منVoiceLiveConnectionError.code

context

معلومات السياق حول مكان حدوث الخطأ

context: string

قيمة الخاصية

string

موروث منVoiceLiveConnectionError.context

message

message: string

قيمة الخاصية

string

موروث منVoiceLiveConnectionError.message

name

name: string

قيمة الخاصية

string

ورث منVoiceLiveConnectionError.name

recoverable

يشير إلى ما إذا كان هذا الخطأ قابلا للاسترجاع

recoverable: boolean

قيمة الخاصية

boolean

موروث منVoiceLiveConnectionError.recoverable

stack

stack?: string

قيمة الخاصية

string

موروث منVoiceLiveConnectionError.stack

stackTraceLimit

تحدد الخاصية Error.stackTraceLimit عدد إطارات المكدس التي جمعها تتبع المكدس (سواء تم توليدها بواسطة new Error().stack أو Error.captureStackTrace(obj)).

القيمة الافتراضية هي 10 ولكن يمكن تعيينها على أي رقم جافاسكريبت صالح. التغييرات ستؤثر على أي تتبع مكدس يتم التقاطه بعد تغيير القيمة.

إذا تم ضبطها على قيمة غير رقمية، أو على رقم سالب، فلن تلتقط مسارات المكدس أي إطارات.

static stackTraceLimit: number

قيمة الخاصية

number

موروث منVoiceLiveConnectionError.stackTraceLimit

timestamp

الطابع الزمني عند حدوث الخطأ

timestamp: Date

قيمة الخاصية

Date

موروث منVoiceLiveConnectionError.timestamp

تفاصيل الأساليب المتوارثة

captureStackTrace(object, Function)

ينشئ خاصية .stack على targetObject، والتي عند الوصول إليها تعيد سلسلة تمثل الموقع في الكود الذي Error.captureStackTrace() تم استدعاء عنده.

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

السطر الأول من المسار سيسبق ب ${myObject.name}: ${myObject.message}.

الوسيط الاختياري constructorOpt يقبل دالة. إذا تم إعطاؤها، حذف جميع الإطارات أعلاه constructorOpt، بما في ذلك constructorOpt، من تتبع المكدس المولد.

الحجة constructorOpt مفيدة لإخفاء تفاصيل تنفيذ توليد الأخطاء عن المستخدم. على سبيل المثال،

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)

المعلمات

targetObject

object

constructorOpt

Function

موروث منVoiceLiveConnectionError.captureStackTrace

prepareStackTrace(Error, CallSite[])

راجع https://v8.dev/docs/stack-trace-api#customizing-stack-traces

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

المعلمات

err

Error

stackTraces

CallSite[]

المرتجعات

any

موروث منVoiceLiveConnectionError.prepareStackTrace