Skip to content

Commit

Permalink
Dev: Missing error code in exception
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 26, 2020
1 parent ff4dceb commit fed9d10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/controllers/admin/questionedit.php
Expand Up @@ -296,7 +296,8 @@ public function saveQuestionData($sid)
} catch (CException $ex) {
throw new LSJsonException(
500,
gT('Question has been stored, but an error happened: ')."\n".$ex->getMessage(),
gT('Question has been stored, but an error happened: ')."\n".$ex->getMessage()
. ' ' . $ex->getFile() . ': ' . $ex->getLine(),
0,
App()->createUrl(
'admin/questioneditor/sa/view/',
Expand Down Expand Up @@ -1275,6 +1276,7 @@ private function storeAnswerOptions(&$oQuestion, $dataSet, $isCopyProcess = fals
$answerSaved = $oAnswer->save();
if (!$answerSaved) {
throw new CHttpException(
500,
"Answer option couldn't be saved. Error: "
. print_r($oAnswer->getErrors(), true)
);
Expand Down

0 comments on commit fed9d10

Please sign in to comment.