<h1><code ng:non-bindable="">$exceptionHandlerProvider</code>
<span class="hint">(service in module <code ng:non-bindable="">ngMock</code>
)</span>
</h1>
<div><h2 id="Description">Description</h2>
<div class="description"><p>Configures the mock implementation of <a href="api/angular.module.ng.$exceptionHandler"><code>angular.module.ng.$exceptionHandler</code></a> to rethrow or to log errors passed
into the <code>$exceptionHandler</code>.</p></div>
<div class="member method"><h2 id="Methods">Methods</h2>
<ul class="methods"><li><h3 id="mode">mode(mode)</h3>
<div class="mode"><p>Sets the logging mode.</p><h4 id="Parameters">Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">mode – {string} – </code>
<p>Mode of operation, defaults to <code>rethrow</code>.</p>

<ul>
<li><code>rethrow</code>: If any errors are are passed into 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.</li>
<li><code>log</code>: Sometimes it is desirable to test that an error is throw, for this case the <code>log</code> mode stores the
       error and allows later assertion of it.
       See <a href="api/angular.module.ngMock.$log#assertEmpty"><code>assertEmpty()</code></a> and
        <a href="api/angular.module.ngMock.$log#reset"><code>reset()</code></a></li>
</ul></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
