Улучшить эту документацию Просмотреть исходный код $exceptionHandlerProvider
- $exceptionHandler
- провайдер в модуле ngMock
Настраивает имитацию реализации $exceptionHandler для повторной генерации или записи ошибок, переданных в $exceptionHandler.
Методы
-
mode(mode);
Устанавливает режим ведения журнала.
Параметры
Параметр Тип Подробности mode stringРежим работы, по умолчанию
rethrow.-
rethrow: Если любые ошибки передаются обработчику в тестах, он обычноmeans that there is a bug in the application or test, so this mock will make these tests fail.
-
log: Иногда желательно проверить, что ошибка была выброшена, для этого случаяlogmode stores an array of errors in `$exceptionHandler.errors`, to allow later assertion of them. See assertEmpty() and reset()
-
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ngMock/provider/$exceptionHandlerProvider