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) 回答1: You have to gain access over STDERR and,