-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Deprecate client-side
Alchemy#handleError()
method in favour of …
…`registerError()`
- Loading branch information
Showing
1 changed file
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,7 @@ Alchemy.setMethod(function distinctProblem(id, message, options = {}) { | |
}); | ||
|
||
/** | ||
* Register a custom handler | ||
* Register a custom handler for the given type | ||
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.3.21 | ||
|
@@ -272,6 +272,20 @@ Alchemy.setMethod(function getAllCustomHandlers(type) { | |
return []; | ||
}); | ||
|
||
/** | ||
* Deprecated alias to `registerError()` | ||
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.0.5 | ||
* @version 1.4.0 | ||
* | ||
* @param {Error} err | ||
* @param {Object} config | ||
*/ | ||
Alchemy.setMethod(function handleError(err, config) { | ||
return this.registerError(err, config); | ||
}); | ||
|
||
/** | ||
* Actually print a log message | ||
* | ||
|
@@ -1268,18 +1282,18 @@ Alchemy.setMethod(function enableWebsockets() { | |
}); | ||
|
||
/** | ||
* Handle an error | ||
* Register an error | ||
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.0.5 | ||
* @version 1.0.5 | ||
* @version 1.4.0 | ||
* | ||
* @param {Error} err | ||
* @param {Object} config | ||
*/ | ||
Alchemy.setMethod(function handleError(err, config) { | ||
Alchemy.setMethod(function registerError(err, config) { | ||
|
||
var message; | ||
let message; | ||
|
||
if (!config) { | ||
config = {}; | ||
|