@syncot/error
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.2.0](https://github.com/SyncOT/SyncOT/compare/@syncot/error@0.1.0...@syncot/error@0.2.0) (2020-01-28) | ||
### Features | ||
* add PingError ([fa95725](https://github.com/SyncOT/SyncOT/commit/fa957254e7104b938abe44019db38df457d08872)) | ||
# [0.1.0](https://github.com/SyncOT/SyncOT/compare/@syncot/error@0.0.6...@syncot/error@0.1.0) (2019-12-04) | ||
@@ -8,0 +19,0 @@ |
@@ -126,1 +126,7 @@ export interface ErrorDetails { | ||
export declare function isAssertError(error: any): error is AssertError; | ||
export interface PingError extends Error { | ||
cause?: Error; | ||
name: 'SyncOtError Ping'; | ||
} | ||
export declare function createPingError(message?: string, cause?: Error): PingError; | ||
export declare function isPingError(error: any): error is PingError; |
@@ -231,1 +231,11 @@ function assert(value, message) { | ||
} | ||
export function createPingError(message, cause) { | ||
return createError({ | ||
cause, | ||
message, | ||
name: 'SyncOtError Ping', | ||
}); | ||
} | ||
export function isPingError(error) { | ||
return error instanceof Error && error.name === 'SyncOtError Ping'; | ||
} |
{ | ||
"name": "@syncot/error", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Utilities for managing errors.", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "826d566f85342309a513529839aca7a5aeb5815e" | ||
"gitHead": "4c301b17359a9fc7e7da55677f752f7b74a4b2e3" | ||
} |
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
16238
373