1

I want to customize the default exception handler behavior and to do that I want to override the ExceptionHandler class, but I get the next error when I use the next code

Error:

  Module '"angular2/angular2"' has no exported member 'ExceptionHandler'. 

Code:

    import {ExceptionHandler} from 'angular2/angular2';

Is this the correct aproach ? From where or what I have to import ?

1

2 Answers 2

4

I think it's bug. ExceptionHandler must be exported here, but it's not.

For now for experimenting you can import ExceptionHandler like:

import { ExceptionHandler } from 'angular2/src/core/facade/exceptions';

Check out this plunker

Sign up to request clarification or add additional context in comments.

1 Comment

In [email protected] I'm using... import { ExceptionHandler } from 'angular2/src/facade/exceptions';
0

Here's a new plunker (modified @alexpods version) that works in beta 11. http://plnkr.co/edit/7VEjaohuse2sLneuCIVC?p=preview

Basic differences:

  • use of provide instead of bind
  • other System JS paths for import

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.