~gregfr/phpdevshell/trunk-modern

« back to all changes in this revision

Viewing changes to themes/cloud/error.php

  • Committer: greg
  • Date: 2012-06-11 15:18:13 UTC
  • Revision ID: greg@silencer-20120611151813-3dfhqfarg4ejol55
- improved error handling when an exception occurs inside an ajax request

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
 
2
 
2
3
/**
3
 
 * This ajax will be displayed whenever an unhandled error or exception occurs in PHPDevShell
 
4
 * This page will be displayed whenever an unhandled error or exception occurs in PHPDevShell
4
5
 */
5
 
// If the error occured during an AJAX request, we'll send back a lightweight ouput
6
 
if (PU_isAJAX()) {
7
 
        if (!empty($message)) {
8
 
                print "$message - file $filepath line $lineno";
9
 
        } else {
10
 
                print 'Unknown error';
11
 
        }
12
 
} else {
13
 
// for a regular request, we present a nicely formatted html page; if provided, an extended description of the error is displayed
14
6
        $skin = $this->configuration['skin'];
15
7
?>
16
8
<!DOCTYPE HTML>
138
130
                <?php }?>
139
131
        </body>
140
132
</html>
141
 
<?php } ?>
 
 
b'\\ No newline at end of file'