VoiceLiveProtocolError class

Voice Liveメッセージ操作のプロトコルエラークラス

Extends

コンストラクター

VoiceLiveProtocolError(string, string, Error)

継承されたプロパティ

cause

このエラーを引き起こした元々のエラー(もしあれば)です

code

特定のエラータイプを示すエラーコード

context

エラーが発生した場所に関するコンテキスト情報

message
name
recoverable

このエラーが回復可能かどうかを示します

stack
stackTraceLimit

Error.stackTraceLimitの性質は、スタックトレースによって収集されるスタックフレームの数(new Error().stackであれError.captureStackTrace(obj)であれ)を指定します。

デフォルト値は 10 ですが、有効なJavaScript番号に設定することができます。 変更は、値が変更 された後に キャプチャされたスタックトレースに影響を与えます。

非数値値、または負数に設定した場合、スタックトレースはフレームをキャプチャしません。

timestamp

エラーが発生したタイムスタンプ

継承されたメソッド

captureStackTrace(object, Function)

targetObject.stackプロパティを作成し、アクセスすると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 を参照してください

コンストラクターの詳細

VoiceLiveProtocolError(string, string, Error)

new VoiceLiveProtocolError(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 ですが、有効なJavaScript番号に設定することができます。 変更は、値が変更 された後に キャプチャされたスタックトレースに影響を与えます。

非数値値、または負数に設定した場合、スタックトレースはフレームをキャプチャしません。

static stackTraceLimit: number

プロパティ値

number

VoiceLiveConnectionError.stackTraceLimitから継

timestamp

エラーが発生したタイムスタンプ

timestamp: Date

プロパティ値

Date

VoiceLiveConnectionError.timestampから継

継承済みメソッドの詳細

captureStackTrace(object, Function)

targetObject.stackプロパティを作成し、アクセスすると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から継承