diff --git a/lib/core/client_alchemy.js b/lib/core/client_alchemy.js index 983a2da..ac3053b 100644 --- a/lib/core/client_alchemy.js +++ b/lib/core/client_alchemy.js @@ -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 * @since 1.3.21 @@ -272,6 +272,20 @@ Alchemy.setMethod(function getAllCustomHandlers(type) { return []; }); +/** + * Deprecated alias to `registerError()` + * + * @author Jelle De Loecker + * @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 * @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 = {};