Spec-Zone.ru › Angular.js 1.3

Улучшить эту документацию Просмотреть исходный код $exceptionHandlerProvider

  1. $exceptionHandler
  2. поставщик в модуле ngMock

Настраивает имитацию реализации $exceptionHandler для повторной генерации или записи ошибок, переданных в $exceptionHandler.

Методы

  • mode(mode);

    Устанавливает режим ведения журнала.

    Параметры

    Параметр Тип Подробности
    mode string

    Режим работы, по умолчанию rethrow.

    • log: Иногда желательно проверить, что ошибка была выброшена, для этого случая используется log
      mode stores an array of errors in `$exceptionHandler.errors`, to allow later
      assertion of them. See assertEmpty() and
      reset()
      
    • rethrow: Если любые ошибки передаются обработчику в тестах, это обычно означает, что 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, 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API