From: Alexander Ebert Date: Tue, 30 Jul 2013 12:22:31 +0000 (+0200) Subject: Improved exception message X-Git-Tag: 2.0.0_Beta_6~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b49ad0960f840cf0e27db990bdf5e841c1c1d3ce;p=GitHub%2FWoltLab%2FWCF.git Improved exception message --- diff --git a/wcfsetup/install/files/lib/system/exception/SystemException.class.php b/wcfsetup/install/files/lib/system/exception/SystemException.class.php index 18d5824b1b..16c5199f67 100644 --- a/wcfsetup/install/files/lib/system/exception/SystemException.class.php +++ b/wcfsetup/install/files/lib/system/exception/SystemException.class.php @@ -68,6 +68,16 @@ class SystemException extends LoggedException implements IPrintableException { return; } + $innerMessage = ''; + try { + $innerMessage = WCF::getLanguage()->get('wcf.global.error.exception', true); + } + catch (\Exception $e) { } + + if (empty($innerMessage)) { + $innerMessage = 'Please send the ID above to the site administrator.
The error message can be looked up at “ACP » Logs » Errors”.'; + } + // print report echo ''; $e = ($this->getPrevious() ?: $this); @@ -162,8 +172,8 @@ class SystemException extends LoggedException implements IPrintableException {

Information:

- id: getExceptionID(); ?>
- Send this ID to the administrator of this website to report this issue. + ID: getExceptionID(); ?>
+

diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index cb36250c21..6b21babcd1 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1618,6 +1618,7 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getAllowedExtensions() + Die Fehlermeldung kann mit dieser ID über „ACP » Protokoll » Fehler“ eingesehen werden.]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 5843bfda0f..41bedbf947 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1616,6 +1616,7 @@ Allowed extensions: {', '|implode:$attachmentHandler->getAllowedExtensions()}]]> + The error message can be looked up at “ACP » Logs » Errors”.]]>