MessagingError class

يصف الفئة الأساسية لخطأ المراسلة.

يمتد

Error

المنشئون

MessagingError(string, Error)

الخصائص

address

العنوان الذي فشل فيه اتصال الشبكة. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

code

تسمية سلسلة تحدد الخطأ.

errno

رقم الخطأ المقدم من النظام. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

info

تفاصيل إضافية حول الخطأ.

name

اسم الخطأ. القيمة الافتراضية: "MessagingError".

port

منفذ اتصال الشبكة غير المتوفر. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

retryable

يصف ما إذا كان الخطأ قابلا لإعادة المحاولة. الافتراضي: صحيح.

syscall

اسم استدعاء النظام الذي أدى إلى ظهور الخطأ. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

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

message
prepareStackTrace

تجاوز اختياري لتنسيق تتبعات مكدس الذاكرة المؤقتة

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

stack
stackTraceLimit

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

captureStackTrace(object, Function)

إنشاء خاصية .stack على كائن هدف

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

MessagingError(string, Error)

new MessagingError(message: string, originalError?: Error)

المعلمات

message

string

رسالة الخطأ التي توفر المزيد من المعلومات حول الخطأ.

originalError

Error

خطأ سيتم نسخ خصائصه إلى MessagingError إذا تطابقت الخاصية مع خاصية تم العثور عليها في Node.js SystemError.

تفاصيل الخاصية

address

العنوان الذي فشل فيه اتصال الشبكة. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

address?: string

قيمة الخاصية

string

code

تسمية سلسلة تحدد الخطأ.

code?: string

قيمة الخاصية

string

errno

رقم الخطأ المقدم من النظام. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

errno?: string | number

قيمة الخاصية

string | number

info

تفاصيل إضافية حول الخطأ.

info?: any

قيمة الخاصية

any

name

اسم الخطأ. القيمة الافتراضية: "MessagingError".

name: string

قيمة الخاصية

string

port

منفذ اتصال الشبكة غير المتوفر. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

port?: number

قيمة الخاصية

number

retryable

يصف ما إذا كان الخطأ قابلا لإعادة المحاولة. الافتراضي: صحيح.

retryable: boolean

قيمة الخاصية

boolean

syscall

اسم استدعاء النظام الذي أدى إلى ظهور الخطأ. موجود فقط إذا MessagingError تم إنشاء مثيل مع Node.js SystemError.

syscall?: string

قيمة الخاصية

string

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

message

message: string

قيمة الخاصية

string

موروث من Error.message

prepareStackTrace

تجاوز اختياري لتنسيق تتبعات مكدس الذاكرة المؤقتة

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

static prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

قيمة الخاصية

(err: Error, stackTraces: CallSite[]) => any

موروث من Error.prepareStackTrace

stack

stack?: string

قيمة الخاصية

string

موروث من Error.stack

stackTraceLimit

static stackTraceLimit: number

قيمة الخاصية

number

موروث من Error.stackTraceLimit

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

captureStackTrace(object, Function)

إنشاء خاصية .stack على كائن هدف

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

المعلمات

targetObject

object

constructorOpt

Function

موروث من Error.captureStackTrace