mercredi 27 avril 2016

try .. catch with system() command php on laravel 5.0

I've a code for command app made on laravel 5.0 with try .. catch and use system command. When there a exception, my catch not work.

use Illuminate\Support\Facades\Log;
...
try {
  system('.dump master | sqlite3 ' . $older . ' > ' . storage_path() . '/tmp/' . $tabla . '.sql' );
} catch ( \Exception $e) {
  Log::alert('Problem import old table '. $tabla . $e->GetMessage());
}

I see my error on shell but not write on my own laravel log. (Log:alert)



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1NzsAUN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire