From fed9d10a79663aeac3bf5b9ae7971364284c4ea3 Mon Sep 17 00:00:00 2001 From: Olle Harstedt Date: Thu, 26 Mar 2020 15:07:16 +0100 Subject: [PATCH] Dev: Missing error code in exception --- application/controllers/admin/questionedit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/controllers/admin/questionedit.php b/application/controllers/admin/questionedit.php index 48cfed6be5e..8e209d69305 100644 --- a/application/controllers/admin/questionedit.php +++ b/application/controllers/admin/questionedit.php @@ -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/', @@ -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) );