janmisek / ember-exex Goto Github PK
View Code? Open in Web Editor NEWExceptional Exceptions for ambitious applications
License: MIT License
Exceptional Exceptions for ambitious applications
License: MIT License
Hi,
I'm trying to add an option to some Errors but looking at your code the options are not stored inside the instance.
Also, the 'ember way' of using reopen does not work as these errors are not an ember object.
MaintenanceError.reopen({
useRouter: true, /* would navigate away from the UI where the issue happened */
useNotification: true, /* use a notification service */
});
So my question is a JS one. How would I add a property to an error definition?
Error message in stacktrace is very useful during debugging.
# console.log(new Error('message').stack);
route.js:7 Error: message
at Class.model (route.js:7)
at Class.deserialize (ember.debug.js:27151)
at applyHook (ember.debug.js:56576)
at C.runSharedModelHook (ember.debug.js:57193)
at C.getModel (ember.debug.js:57392)
at ember.debug.js:56430
at tryCatch (ember.debug.js:59057)
at invokeCallback (ember.debug.js:59072)
at publish (ember.debug.js:59040)
at ember.debug.js:38885
VS
# console.log(new Ember.Error('message').stack);
Error
at Class.model (route.js:6)
at Class.deserialize (ember.debug.js:27151)
at applyHook (ember.debug.js:56576)
at C.runSharedModelHook (ember.debug.js:57193)
at C.getModel (ember.debug.js:57392)
at ember.debug.js:56430
at tryCatch (ember.debug.js:59057)
at invokeCallback (ember.debug.js:59072)
at publish (ember.debug.js:59040)
at ember.debug.js:38885
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.