I was curious if there is a way we can check if there is a constraint violation error when delete or insert a record into the database.
The exception thrown is called \'
You can add the following code in app/start/global.php file in order to print the exception
App::error(function(QueryException $exception) { print_r($exception->getMessage()); });
check this part in the documentation