Skip to content

Commit

Permalink
MDL-84456 Backup: Rethrow exception if backup controller loading fails
Browse files Browse the repository at this point in the history
  • Loading branch information
djarran committed Feb 6, 2025
1 parent 139a0ad commit 5c8091b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classes/task/asynchronous_copy_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function execute() {
} catch (\backup_dbops_exception $e) {
mtrace('Course copy: Can not load backup controller for copy, marking job as failed');
delete_course($restorerecord->itemid, false); // Clean up partially created destination course.
return; // Return early as we can't continue.
throw $e; // Rethrow exception, can't continue rest of execution.
}

$rc = \restore_controller::load_controller($restoreid); // Get the restore controller by restore id.
Expand Down

0 comments on commit 5c8091b

Please sign in to comment.