Included stacktrace in PermissionDeniedException
authorAlexander Ebert <ebert@woltlab.com>
Thu, 9 Feb 2012 15:28:08 +0000 (16:28 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 9 Feb 2012 15:28:08 +0000 (16:28 +0100)
Closes #209

com.woltlab.wcf/template/permissionDenied.tpl
wcfsetup/install/files/acp/templates/permissionDenied.tpl
wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php

index 8831f320f0c8e1b1459e26b42c5e107bbce2bb0e..298fe316b7f7a69ef20dc49044a79a712d06a90f 100644 (file)
 
 </div>
 
+{if ENABLE_DEBUG_MODE}
+       <!-- 
+       {$name} thrown in {$file} ({@$line})
+       Stracktrace:
+       {$stacktrace}
+       -->
+{/if}
+
 {include file='footer' sandbox=false}
 </body>
 </html>
\ No newline at end of file
index 06fdb061da3399eac31b3f83a726bd0dc2ef4f06..58b8fc8c6e926d38f7acc1cd01e1f0a2b04f0575 100644 (file)
@@ -2,4 +2,12 @@
 
 <p class="wcf-error">{lang}wcf.global.error.permissionDenied{/lang}</p>
 
+{if ENABLE_DEBUG_MODE}
+       <!-- 
+       {$name} thrown in {$file} ({@$line})
+       Stracktrace:
+       {$stacktrace}
+       -->
+{/if}
+
 {include file='footer'}
index 7e5115582d2d61397515f5b8d2a84e4092f71db0..1737660323ce058af4ccfaa0d01a0a09a8f5e03a 100644 (file)
@@ -27,6 +27,10 @@ class PermissionDeniedException extends UserException {
                @header('HTTP/1.0 403 Forbidden');
                
                WCF::getTPL()->assign(array(
+                       'name' => get_class($this),
+                       'file' => $this->getFile(),
+                       'line' => $this->getLine(),
+                       'stacktrace' => $this->getTraceAsString(),
                        'templateName' => 'permissionDenied'
                ));
                WCF::getTPL()->display('permissionDenied');