@magic/error
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@magic/error", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Wizards & Witches", | ||
@@ -5,0 +5,0 @@ "description": "errors for @magic", |
@@ -37,9 +37,9 @@ # @magic/error | ||
err = error('message', 'name') | ||
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E' } | ||
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E', msg: 'message' } | ||
err = error('message') | ||
// Error { message: 'message', name: 'Unknown', code: 'E_UNKNOWN', type: 'E' } | ||
// Error { message: 'message', name: 'Unknown', code: 'E_UNKNOWN', type: 'E', msg: 'message' } | ||
err = error(new Error('message')) | ||
// Error { message: 'message', name: 'Error', code: 'E_UNKNOWN', type: 'E' } | ||
// Error { message: 'message', name: 'Error', code: 'E_UNKNOWN', type: 'E', msg: 'message' } | ||
@@ -51,4 +51,14 @@ err = error('message', 'name with spaces') | ||
// code: 'E_NAME_WITH_SPACES', | ||
// type: 'E' | ||
// type: 'E', | ||
// msg: 'message', | ||
// } | ||
err = error(['message', 'name', 'T']) | ||
// Error { message: 'message', name: 'name', code: 'T_NAME', type: T, msg: 'message' } | ||
err = error(['message'], 'name', 'T') | ||
// Error { message: 'message', name: 'name', code: 'T_NAME', type: T, msg: 'message' } | ||
err = error(['message', 'name1'], 'name2', 'T') | ||
// Error { message: 'message', name: 'name1', code: 'T_NAME1', type: T, msg: 'message' } | ||
``` | ||
@@ -62,11 +72,11 @@ | ||
err = error('message', 'name') | ||
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E' } | ||
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E', msg: 'message' } | ||
// warnings: | ||
err = error('message', 'name', 'W') | ||
// Error { message: 'message', name: 'name', code: 'W_NAME', type: 'W' } | ||
// Error { message: 'message', name: 'name', code: 'W_NAME', type: 'W', msg: 'message' } | ||
// debug: | ||
err = error('message', 'name', 'D') | ||
// Error { message: 'message', name: 'name', code: 'D_NAME', type: 'D' } | ||
// Error { message: 'message', name: 'name', code: 'D_NAME', type: 'D', msg: 'message' } | ||
``` | ||
@@ -90,3 +100,7 @@ | ||
#### 0.0.4 - unreleased | ||
#### 0.0.4 | ||
* err.msg is no === err.message | ||
* first argument can be an array of [message, name, type] | ||
#### 0.0.5 - unreleased | ||
... |
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
40306
43
103