diff --git a/app/Console/Commands/SimpedeRestore.php b/app/Console/Commands/SimpedeRestore.php index ff6228c411725d1c568ac4848f9eee92bb6d84ee..4597d3d486a0a7423df2cb9a6b17e7e22529cc9f 100644 --- a/app/Console/Commands/SimpedeRestore.php +++ b/app/Console/Commands/SimpedeRestore.php @@ -119,11 +119,9 @@ public function handle() } else { $this->error('❌ Restore failed!'); } - } catch (Exception $e) { $this->error('❌ Restore failed with error: '.$e->getMessage()); $success = false; - } finally { if ($tempDir) { $this->cleanup($tempDir); @@ -276,7 +274,6 @@ private function restoreDatabase($tempDir) return false; } - } catch (Exception $e) { $this->error('❌ Database restore error: '.$e->getMessage()); @@ -330,7 +327,6 @@ private function restoreFiles($tempDir) $this->info("📊 File restoration completed: {$restored} successful, {$failed} failed"); return $failed === 0; - } catch (Exception $e) { $this->error('❌ File restoration failed with error: '.$e->getMessage()); @@ -517,7 +513,6 @@ private function listBackups() if (count($backups) > 10) { $this->line(' ... and '.(count($backups) - 10).' more backups'); } - } catch (Exception $e) { $this->line(' Error accessing disk: '.$e->getMessage()); } @@ -586,7 +581,6 @@ private function dropAllTables() $this->info('✅ All tables dropped successfully'); return true; - } catch (Exception $e) { $this->error('❌ Failed to drop tables: '.$e->getMessage()); @@ -711,7 +705,6 @@ private function importDatabaseDump($dumpFile, $connection) echo "❌ Restore failed. Output:\n".implode("\n", $output)."\n"; return false; - } catch (\Throwable $e) { echo '⚠️ Error occurred: '.$e->getMessage()."\n";