Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2017-02-06 11:55:18 -0500
committerMike Gerwitz <gerwitzm@lovullo.com>2017-02-06 16:12:26 -0500
commita65f568714719363e04df947ceb915e96bfdf97b (patch)
tree1eedd8a39589c18e963da2c351f7f07296e22b05
parentbd81e2e726d09a4cc14b5d693e00236a1dc02f09 (diff)
downloadliza-a65f568714719363e04df947ceb915e96bfdf97b.tar.gz
liza-a65f568714719363e04df947ceb915e96bfdf97b.tar.bz2
liza-a65f568714719363e04df947ceb915e96bfdf97b.zip
UnknownEventError: use ease.js
ease.js supports Error extending now. * src/event/UnknownEventError.js: Use easejs.
-rw-r--r--src/event/UnknownEventError.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/event/UnknownEventError.js b/src/event/UnknownEventError.js
index da346c8..31e5537 100644
--- a/src/event/UnknownEventError.js
+++ b/src/event/UnknownEventError.js
@@ -19,19 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-module.exports = function UnknownEventError( msg )
-{
- // 'new' keyword optional
- if ( !( this instanceof module.exports ) )
- {
- return new module.exports( msg );
- }
+const Class = require( 'easejs' ).Class;
- Error.prototype.constructor.apply( this, arguments );
-};
-// extends TypeError
-module.exports.constructor = module.exports;
-module.exports.prototype = TypeError();
-module.exports.prototype.name = 'UnknownEventError';
+module.exports = Class( 'UnknownEventHandler' )
+ .extend( TypeError,
+{
+} );