In my controller i need to test custom database connection and if it's bad return an error. The problem is that catch block doesn't work... I get an exception message which is globally defined in app/start/global.php.
try {
DB::connection('test');
} catch (Exception $e) {
dd('error');
}
errormessage fromdd, but it just throws original laravel exception"type":"PDOException","message":"SQLSTATE[HY000] [2002] Connection refused",