try-catch未处理PhP Laravel远程错误

try-catch未处理PhP Laravel远程错误,php,try-catch,remote-access,Php,Try Catch,Remote Access,所以我有这段代码,当我由于某种原因(错误的凭据或没有网络连接或类似的原因)无法连接时,我试图捕获一个错误,但它不工作,我的应用程序因错误而崩溃 try { $connection = new Remote([ 'host' => $equipment->ip_address, 'port' => 22, 'username' => EquipmentAccess::where('equipment_id', $equ

所以我有这段代码,当我由于某种原因(错误的凭据或没有网络连接或类似的原因)无法连接时,我试图捕获一个错误,但它不工作,我的应用程序因错误而崩溃

try {
    $connection = new Remote([
        'host' => $equipment->ip_address,
        'port' => 22,
        'username' => EquipmentAccess::where('equipment_id', $equipment->id)->first()->ssh_user,
        'password' => EquipmentAccess::where('equipment_id', $equipment->id)->first()->ssh_password,
    ]);
    $command = $request->command . ' ' . $request->argv;
    $ip = $connection->exec($command);
} catch (Exception $e) {
    echo "Houston, we have a problem:" . $e;
}
如果有人能告诉我我错过了什么,我将不胜感激

编辑:我想,我还不够清楚。它因典型的laravel管道错误而崩溃,最新的一个错误是,它无法连接到该设备。它应该会告诉我我的错误信息


EDIT2:这里有一个指向堆栈跟踪的SS的链接-

错误消息???什么错误?请记住,错误(不是异常)是不可恢复的。您可以发布错误堆栈跟踪吗