title: Catching a query exception?
body: <p>I have a slug column in my database, it's unique.</p>
  
  <p>If I try and store another row with a non unique slug I get a QueryException error.</p>
  
  <p>I catch the error, and hope to return an error message something along the lines that "slug exists".</p>
  
  <pre><code>try {
      User::create($data);
  } catch (\Illuminate\Database\QueryException $e) {
      //return the error
  }
  </code></pre>
  
  <p>The above is fine, but I'm just wondering, what if another QueryException is thrown, not to do with the duplicate slug and i return a duplicate slug error message incorrectly.</p>
  
  <p>Is there a way to find out what the query exception was and return an error message based on this? i know the exception provides its own message but I was hoping for something a little more user friendly.</p>