damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20180330-IonicGlobalErrorHandler.html #70

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20180330-IonicGlobalErrorHandler.html

damirarh commented 1 year ago

Imported comment written by RobFergusonOrg on 2018-05-22T05:03:36

-> You'll lose the custom error overlay during development.

Try:

 

import { ENV } from '@env';

...

providers: [
ENV.production ? { provide: ErrorHandler, useClass: GlobalErrorHandler } :
{ provide: ErrorHandler, useClass: IonicErrorHandler}
]


damirarh commented 1 year ago

Imported comment written by Tolga Ekmen on 2018-09-12T20:26:25

not if you extend `extends IonicErrorHandler` instead of `ErrorHandler` and call `super.handleError(err)`. Then you can have both