@blocksuite/global
Advanced tools
Comparing version 0.0.0-canary-20241105001358 to 0.0.0-canary-20241105063536
# @blocksuite/global | ||
## 0.0.0-canary-20241105001358 | ||
## 0.0.0-canary-20241105063536 | ||
@@ -5,0 +5,0 @@ ### Patch Changes |
@@ -23,2 +23,3 @@ export declare enum ErrorCode { | ||
UserAbortError = 21, | ||
ExecutionError = 22, | ||
DefaultFatalError = 10000, | ||
@@ -25,0 +26,0 @@ NoRootModelError = 10001, |
@@ -24,2 +24,3 @@ export var ErrorCode; | ||
ErrorCode[ErrorCode["UserAbortError"] = 21] = "UserAbortError"; | ||
ErrorCode[ErrorCode["ExecutionError"] = 22] = "ExecutionError"; | ||
// Fatal error should be greater than 10000 | ||
@@ -26,0 +27,0 @@ ErrorCode[ErrorCode["DefaultFatalError"] = 10000] = "DefaultFatalError"; |
@@ -5,3 +5,5 @@ import type { ErrorCode } from './code.js'; | ||
isFatal: boolean; | ||
constructor(code: ErrorCode, message: string); | ||
constructor(code: ErrorCode, message: string, options?: { | ||
cause: Error; | ||
}); | ||
} | ||
@@ -8,0 +10,0 @@ export declare function handleError(error: Error): void; |
export class BlockSuiteError extends Error { | ||
constructor(code, message) { | ||
super(message); | ||
constructor(code, message, options) { | ||
super(message, options); | ||
this.name = 'BlockSuiteError'; | ||
@@ -5,0 +5,0 @@ this.code = code; |
{ | ||
"name": "@blocksuite/global", | ||
"version": "0.0.0-canary-20241105001358", | ||
"version": "0.0.0-canary-20241105063536", | ||
"types": "./index.d.ts", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -23,2 +23,3 @@ export enum ErrorCode { | ||
UserAbortError, | ||
ExecutionError, | ||
@@ -25,0 +26,0 @@ // Fatal error should be greater than 10000 |
@@ -8,4 +8,4 @@ import type { ErrorCode } from './code.js'; | ||
constructor(code: ErrorCode, message: string) { | ||
super(message); | ||
constructor(code: ErrorCode, message: string, options?: { cause: Error }) { | ||
super(message, options); | ||
this.name = 'BlockSuiteError'; | ||
@@ -12,0 +12,0 @@ this.code = code; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
714006
11023