@@ -119,11 +119,9 @@ public function handle()
119
119
} else {
120
120
$ this ->error ('❌ Restore failed! ' );
121
121
}
122
-
123
122
} catch (Exception $ e ) {
124
123
$ this ->error ('❌ Restore failed with error: ' .$ e ->getMessage ());
125
124
$ success = false ;
126
-
127
125
} finally {
128
126
if ($ tempDir ) {
129
127
$ this ->cleanup ($ tempDir );
@@ -276,7 +274,6 @@ private function restoreDatabase($tempDir)
276
274
277
275
return false ;
278
276
}
279
-
280
277
} catch (Exception $ e ) {
281
278
$ this ->error ('❌ Database restore error: ' .$ e ->getMessage ());
282
279
@@ -330,7 +327,6 @@ private function restoreFiles($tempDir)
330
327
$ this ->info ("📊 File restoration completed: {$ restored } successful, {$ failed } failed " );
331
328
332
329
return $ failed === 0 ;
333
-
334
330
} catch (Exception $ e ) {
335
331
$ this ->error ('❌ File restoration failed with error: ' .$ e ->getMessage ());
336
332
@@ -517,7 +513,6 @@ private function listBackups()
517
513
if (count ($ backups ) > 10 ) {
518
514
$ this ->line (' ... and ' .(count ($ backups ) - 10 ).' more backups ' );
519
515
}
520
-
521
516
} catch (Exception $ e ) {
522
517
$ this ->line (' Error accessing disk: ' .$ e ->getMessage ());
523
518
}
@@ -586,7 +581,6 @@ private function dropAllTables()
586
581
$ this ->info ('✅ All tables dropped successfully ' );
587
582
588
583
return true ;
589
-
590
584
} catch (Exception $ e ) {
591
585
$ this ->error ('❌ Failed to drop tables: ' .$ e ->getMessage ());
592
586
@@ -711,7 +705,6 @@ private function importDatabaseDump($dumpFile, $connection)
711
705
echo "❌ Restore failed. Output: \n" .implode ("\n" , $ output )."\n" ;
712
706
713
707
return false ;
714
-
715
708
} catch (\Throwable $ e ) {
716
709
echo '⚠️ Error occurred: ' .$ e ->getMessage ()."\n" ;
717
710
0 commit comments