title: Difference between throwable and error in java?
body: <p>Can someone explain to me the difference between Throwable and Error objects in java? I have seen code examples that use a throwable object but require an error object and vice versa and sometimes both seem to work. For example in this code:</p>
  <pre><code>public void onFailure(Error error) {
      Log.e(&quot;MyActivity&quot;, error.getMessage(), error);
  }
  </code></pre>
  <p>vs.</p>
  <pre><code>public void onFailure(Throwable throwable) {
          Log.e(&quot;MyActivity&quot;, throwable.getMessage(), throwable);
  }
  </code></pre>