N°5170 - In a transition DoCheckToWrite returned error, generes a Fatal error (#539)

This commit is contained in:
Anne-Catherine
2024-02-29 16:14:43 +01:00
committed by GitHub
parent 1a8de82be5
commit 5574952033
4 changed files with 36 additions and 7 deletions

View File

@@ -1206,8 +1206,16 @@ try
$bApplyTransition = $oObj->DisplayStimulusForm($oP, $sStimulus, $aPrefillFormParam);
}
catch (ApplicationException $e) {
$bApplyTransition = false;
$sMessage = $e->getMessage();
$sSeverity = 'info';
$sSeverity = 'warning';
ReloadAndDisplay($oP, $oObj, 'stimulus', $sMessage, $sSeverity);
}
catch (CoreCannotSaveObjectException $e) {
$bApplyTransition = false;
$aIssues = $e->getIssues();
$sMessage = $e->getHtmlMessage();
$sSeverity = 'warning';
ReloadAndDisplay($oP, $oObj, 'stimulus', $sMessage, $sSeverity);
}
if ($bApplyTransition) {