ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
_include.php File Reference

Go to the source code of this file.

Functions

 SimpleSAML_exception_handler ($exception)
 
 SimpleSAML_error_handler ($errno, $errstr, $errfile=null, $errline=0, $errcontext=null)
 

Variables

 try
 

Function Documentation

◆ SimpleSAML_error_handler()

SimpleSAML_error_handler (   $errno,
  $errstr,
  $errfile = null,
  $errline = 0,
  $errcontext = null 
)

Definition at line 34 of file _include.php.

35{
36 if (!class_exists('SimpleSAML\Logger')) {
37 /* We are probably logging a deprecation-warning during parsing. Unfortunately, the autoloader is disabled at
38 * this point, so we should stop here.
39 *
40 * See PHP bug: https://bugs.php.net/bug.php?id=47987
41 */
42 return false;
43 }
44
45 if (SimpleSAML\Logger::isErrorMasked($errno)) {
46 // masked error
47 return false;
48 }
49
50 static $limit = 5;
51 $limit -= 1;
52 if ($limit < 0) {
53 // we have reached the limit in the number of backtraces we will log
54 return false;
55 }
56
57 // show an error with a full backtrace
58 $e = new SimpleSAML_Error_Exception('Error '.$errno.' - '.$errstr);
59 $e->logError();
60
61 // resume normal error processing
62 return false;
63}
64
65set_error_handler('SimpleSAML_error_handler');
66
67try {
69} catch (Exception $e) {
70 throw new \SimpleSAML\Error\CriticalConfigurationError(
71 $e->getMessage()
72 );
73}
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
Attribute-related utility methods.

Referenced by SimpleSAML_exception_handler().

+ Here is the caller graph for this function:

◆ SimpleSAML_exception_handler()

SimpleSAML_exception_handler (   $exception)

Definition at line 10 of file _include.php.

11{
12 SimpleSAML\Module::callHooks('exception_handler', $exception);
13
14 if ($exception instanceof SimpleSAML_Error_Error) {
15 $exception->show();
16 } elseif ($exception instanceof Exception) {
17 $e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $exception);
18 $e->show();
19 } else {
20 if (class_exists('Error') && $exception instanceof Error) {
21 $code = $exception->getCode();
22 $errno = ($code > 0) ? $code : E_ERROR;
23 $errstr = $exception->getMessage();
24 $errfile = $exception->getFile();
25 $errline = $exception->getLine();
26 SimpleSAML_error_handler($errno, $errstr, $errfile, $errline);
27 }
28 }
29}
SimpleSAML_error_handler($errno, $errstr, $errfile=null, $errline=0, $errcontext=null)
Definition: _include.php:34
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
Definition: Module.php:281
$code
Definition: example_050.php:99

References $code, SimpleSAML\Module\callHooks(), and SimpleSAML_error_handler().

+ Here is the call graph for this function:

Variable Documentation

◆ try

try
Initial value:

Definition at line 67 of file _include.php.