be exited.</p>
<p>Example:</p>
<pre><code class="language-js">const store = { id: 2 };
try {
  asyncLocalStorage.run(store, () => {
    asyncLocalStorage.getStore(); // Returns the store object
    throw new Error();
  });
} catch (e) {
  asyncLocalStorage.getStore(); // Returns undefined
  // The error will be caught here
}
</code></pre>
<h3><code>asyncLocalStorage.exit(callback[, ...args])</code><span><a class="mark" href="#async_hooks_asynclocalstorage_exit_callback_args" id="async_hooks_asynclocalstorag