1
0
mirror of https://github.com/moodle/moodle.git synced 2025-02-27 21:43:23 +01:00

MDL-76869 gradebook: Pass exception to rollback

This commit is contained in:
Cameron Ball 2023-01-12 16:31:46 +08:00
parent b8b905cd90
commit 6bf955ca9e

@ -231,7 +231,7 @@ class create_gradecategories extends external_api {
} catch (\Exception $e) {
// If the submitted data was broken for any reason.
$warnings['database'] = $e->getMessage();
$transaction->rollback();
$transaction->rollback($e);
return ['warnings' => $warnings];
}
}