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