title: How to check if chrome.runtime.lastError was checked?
body: <p>When <code>chrome.storage.sync.set</code> fails, it calls it's callback and sets <code>chrome.runtime.lastError</code> and unless I access that variable I get</p>
  
  <pre><code>Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
  </code></pre>
  
  <p>in console. Cool, from what I googled that's expected. However, I'm writing a library and don't want user to bother with this, so I have the callback wrapped in another function. But I don't know how to check if <code>chrome.runtime.lastError</code> was checked yet or not in order to know if I want to supress my handling or not.</p>
  
  <p>I want to have something like</p>
  
  <pre><code>chrome.storage.sync.set(key: "foo" * 1024 * 1024, function () {
      user_callback();
      if (!was_last_error_checked()) {
          user_error_callback(chrome.runtime.lastError.message);
      }
  });
  </code></pre>
  
  <p>however, I have no idea how to implement <code>was_last_error_checked</code>...</p>
  
  <p>EDIT: to make it clearer: is there a way to check if <code>chrome.runtime.lastError</code> was accessed inside <code>user_callback</code> so I can avoid triggering <code>user_error_callback</code> with assumption that <code>user_callback</code> already handled the error?</p>