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

View File

@ -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];
}
}