var message = '';
if (data !== null) {
+ if (data.returnValues && data.returnValues.description) {
+ details += '<br><p>Description:</p><p>' + data.returnValues.description + '</p>';
+ }
+
if (data.file && data.line) {
details += '<br><p>File:</p><p>' + data.file + ' in line ' + data.line + '</p>';
}
use wcf\system\exception\InvalidSecurityTokenException;
use wcf\system\exception\NamedUserException;
use wcf\system\exception\PermissionDeniedException;
+use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
use wcf\system\exception\ValidateActionException;
use wcf\system\WCF;
);
}
else {
+ $returnValues = [
+ 'file' => $e->getFile(),
+ 'line' => $e->getLine(),
+ ];
+ if ($e instanceof SystemException && $e->getDescription()) {
+ $returnValues['description'] = $e->getDescription();
+ }
+
throw new AJAXException(
$e->getMessage(),
AJAXException::INTERNAL_ERROR,
$e->getTraceAsString(),
- [
- 'file' => $e->getFile(),
- 'line' => $e->getLine()
- ],
+ $returnValues,
\wcf\functions\exception\logThrowable($e),
$e->getPrevious()
);