温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/globals/ErrorConstructor
点击访问原文链接

interface ErrorConstructor | globals module | Bun

interface ErrorConstructor | globals module | BunBuildDocsReferenceGuidesBlogDiscord/Globals/ErrorConstructorMcaptureStackTraceCoconstructorMisErrorMprepareStackTracePprototypePstackTraceLimit

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Globals/ErrorConstructorMcaptureStackTraceCoconstructorMisErrorMprepareStackTracePprototypePstackTraceLimit

interface

ErrorConstructorinterface ErrorConstructorconstructor ErrorConstructor(message?: string): Error;constructor ErrorConstructor(message?: string,options?: ErrorOptions): Error;readonly prototype: ErrorstackTraceLimit: number

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

captureStackTrace(targetObject: object,constructorOpt?: Function): void;

Create .stack property on a target object

isError(value: unknown): value is Error;

Check if a value is an instance of Error

@param value

The value to check

@returns

True if the value is an instance of Error, false otherwise

prepareStackTrace(err: Error,stackTraces: CallSite[]): any;
Referenced typesinterface Errorcause?: unknown

The cause of the error.

message: stringname: stringstack?: stringinterface ErrorOptionscause?: unknown

The cause of the error.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

interface ErrorConstructor | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for interface globals.ErrorConstructor | Bun