Improve this Doc View Source $exceptionHandlerProvider
- $exceptionHandler
- provider in module ngMock
Configures the mock implementation of $exceptionHandler to rethrow or to log errors passed to the $exceptionHandler.
Methods
-  mode(mode);Sets the logging mode. ParametersParam Type Details mode stringMode of operation, defaults to rethrow.- 
log: Sometimes it is desirable to test that an error is thrown, for this case thelogmode stores an array of errors in$exceptionHandler.errors, to allow later assertion of them. See assertEmpty() and reset().
- 
rethrow: If any errors are passed to the handler in tests, it typically means that there is a bug in the application or test, so this mock will make these tests fail. For any implementations that expect exceptions to be thrown, therethrowmode will also maintain a log of thrown errors in$exceptionHandler.errors.
 
- 
    © 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
    https://code.angularjs.org/1.5.11/docs/api/ngMock/provider/$exceptionHandlerProvider