Commit fb1d1e5b authored by Carsten  Rose's avatar Carsten Rose
Browse files

Separe error text in exception between user and support.

parent 9d8953d2
Pipeline #1051 passed with stage
in 1 minute and 44 seconds
......@@ -179,7 +179,11 @@ class OnString {
} else { // closing delimiter
$exprDepth--;
if ($exprDepth < 0) {
throw new UserFormException("Too many closing delimiters '$delimEnd' in '" . $str . "'", ERROR_MISSING_OPEN_DELIMITER);
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Too many closing delimiters '$delimEnd'",
ERROR_MESSAGE_SUPPORT => "in '$str'"]), ERROR_MISSING_OPEN_DELIMITER);
break;
} elseif ($exprDepth == 0) {
// end of nesting -> replace \n inside nested expression with space
......@@ -196,7 +200,8 @@ class OnString {
$lastDelimPos = $nextDelimPos;
}
if ($exprDepth > 0 ) {
throw new UserFormException("Missing close delimiter '$delimEnd' in '" . $str . "'", ERROR_MISSING_CLOSE_DELIMITER);
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Missing close delimiter '$delimEnd'",
ERROR_MESSAGE_SUPPORT => "in '$str'"]), ERROR_MISSING_CLOSE_DELIMITER);
}
return $str;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment