laravel/framework — pull request #1792 by fadillzzz (2013-07-01 13:34:58+00:00)
Title: Pass in the Error Code from the Database

It's a good idea to pass in the error code as well since we're using the generic `Exception` class. This way, in our code, we can distinguish what kind of error we're dealing with, rather than having to guess from the error message or even try to parse the error code from it.