I'm trying to make a catch try this:
Config::set( 'database.connections.information_schema', array (
'driver' => 'mysql',
'host' => 'localhost',
'port' => '3306',
'database' => 'information_schema',
'username' => 'root',
'password' => '1',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => ''
// 'strict' => false,
));
try
{
$datos = DB::connection('information_schema')->getDatabaseName();
echo "Conectado correctamente a la base de datos: ".$datos.".";
}
catch (Exception $e)
{
echo 'Error';
}
And when he goes right ejectua the try but obviously when to go for the catch does not show echo