diff --git a/lib/function_inheritance.js b/lib/function_inheritance.js index 9ea3393..1c1b0f9 100644 --- a/lib/function_inheritance.js +++ b/lib/function_inheritance.js @@ -1778,14 +1778,22 @@ defClassMethod(function decorateMethod(constructor, decorator, key, method) { * * @author Jelle De Loecker * @since 0.7.18 - * @version 0.7.18 + * @version 0.9.3 * * @param {Function} constructor Constructor to modify prototype of * @param {string} name The name of the method */ defClassMethod(function setAbstractMethod(constructor, name) { Fn.setMethod(constructor, name, function abstractMethod() { - let message = 'The `' + name + '` method has not been implemented in the `' + this.constructor.name + '` class.'; + let name = this.constructor.namespace; + + if (name) { + name += '.' + this.constructor.name; + } else { + name = this.constructor.name; + } + + let message = 'The `' + name + '` method has not been implemented in the `' + name + '` class.'; throw new Error(message); }); });