mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
errors working with babel 6, export v3 shared modules in main common module
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import extendableBuiltin from './libs/extendableBuiltin';
|
||||
|
||||
// Base class for custom application errors
|
||||
// It extends Error and capture the stack trace
|
||||
export class CustomError extends Error {
|
||||
export class CustomError extends extendableBuiltin(Error) {
|
||||
constructor () {
|
||||
super();
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
|
||||
Reference in New Issue
Block a user