Commit 4f434137 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Split error message in toUser and toDeveloper. Add error code. Fixes #8558.

parent af301d6d
Pipeline #1965 passed with stages
in 2 minutes and 47 seconds
......@@ -300,6 +300,7 @@ const ERROR_DOWNLOAD_UNEXPECTED_NUMBER_OF_SOURCES = 1704;
const ERROR_DOWNLOAD_FILE_NOT_READABLE = 1705;
const ERROR_DOWNLOAD_FOPEN_BLOCKED = 1706;
const ERROR_DOWNLOAD_JSON_CONVERT = 1707;
const ERROR_DOWNLOAD_MERGE_FAILED = 1708;
// Excel
const ERROR_EXCEL_POSITION_ARGUMENT_EMPTY = 1800;
......
......@@ -157,7 +157,9 @@ class Download {
exec($cmd, $output, $rc);
if ($rc != 0) {
throw new DownloadException ("<p>Failed: RC=$rc $cmd</p>" . implode("<br>", $output));
throw new DownloadException (json_encode([ERROR_MESSAGE_TO_USER => "Failed to merge PDF file",
ERROR_MESSAGE_TO_DEVELOPER => "CMD: " . $cmd . "<br>RC: $rc<br>Output: " . implode("<br>", $output)])
, ERROR_DOWNLOAD_MERGE_FAILED);
}
return $concatFile;
......
Markdown is supported
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