ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SimpleSAML\Error\ConfigurationError Class Reference
+ Inheritance diagram for SimpleSAML\Error\ConfigurationError:
+ Collaboration diagram for SimpleSAML\Error\ConfigurationError:

Public Member Functions

 __construct ($reason=null, $file=null, array $config=null)
 ConfigurationError constructor. More...
 
 getReason ()
 Get the reason for this exception. More...
 
 getConfFile ()
 Get the configuration file that caused this exception. More...
 
- Public Member Functions inherited from SimpleSAML_Error_Error
 __construct ($errorCode, Exception $cause=null, $httpCode=null)
 Constructor for this error. More...
 
 getErrorCode ()
 Retrieve the error code given when throwing this error. More...
 
 getParameters ()
 Retrieve the error parameters given when throwing this error. More...
 
 getDictTitle ()
 Retrieve the error title tag in dictionary. More...
 
 getDictDescr ()
 Retrieve the error description tag in dictionary. More...
 
 show ()
 Display this error. More...
 
- Public Member Functions inherited from SimpleSAML_Error_Exception
 __construct ($message, $code=0, Exception $cause=null)
 Constructor for this error. More...
 
 getBacktrace ()
 Retrieve the backtrace. More...
 
 getCause ()
 Retrieve the cause of this exception. More...
 
 getClass ()
 Retrieve the class of this exception. More...
 
 format ($anonymize=false)
 Format this exception for logging. More...
 
 formatBacktrace ($anonymize=false)
 Format the backtrace for logging. More...
 
 log ($default_level)
 Print the exception to the log, by default with log level error. More...
 
 logError ()
 Print the exception to the log with log level error. More...
 
 logWarning ()
 Print the exception to the log with log level warning. More...
 
 logInfo ()
 Print the exception to the log with log level info. More...
 
 logDebug ()
 Print the exception to the log with log level debug. More...
 
 __sleep ()
 Function for serialization. More...
 

Protected Attributes

 $reason
 
 $config_file
 
- Protected Attributes inherited from SimpleSAML_Error_Error
 $httpCode = 500
 
 $includeTemplate = null
 

Additional Inherited Members

- Static Public Member Functions inherited from SimpleSAML_Error_Exception
static fromException (Exception $e)
 Convert any exception into a SimpleSAML_Error_Exception. More...
 
- Protected Member Functions inherited from SimpleSAML_Error_Error
 setHTTPCode ()
 Set the HTTP return code for this error. More...
 
 saveError ()
 Save an error report. More...
 
- Protected Member Functions inherited from SimpleSAML_Error_Exception
 initBacktrace (Exception $exception)
 Load the backtrace from the given exception. More...
 
 logBacktrace ($level=\SimpleSAML\Logger::DEBUG)
 Print the backtrace to the log if the 'debug' option is enabled in the configuration. More...
 

Detailed Description

Definition at line 12 of file ConfigurationError.php.

Constructor & Destructor Documentation

◆ __construct()

SimpleSAML\Error\ConfigurationError::__construct (   $reason = null,
  $file = null,
array  $config = null 
)

ConfigurationError constructor.

Parameters
string | null$reasonThe reason for this exception.
string | null$fileThe configuration file that originated this error.
array | null$configThe configuration array that led to this problem.

Definition at line 37 of file ConfigurationError.php.

References $file, $params, SimpleSAML\Error\ConfigurationError\$reason, and array.

38  {
39  $file_str = '';
40  $reason_str = '.';
41  $params = array('CONFIG');
42  if ($file !== null) {
43  $params['%FILE%'] = $file;
44  $basepath = dirname(dirname(dirname(dirname(__FILE__)))).'/';
45  $file_str = '('.str_replace($basepath, '', $file).') ';
46  }
47  if ($reason !== null) {
48  $params['%REASON%'] = $reason;
49  $reason_str = ': '.$reason;
50  }
51  $this->reason = $reason;
52  $this->config_file = $file;
53  parent::__construct($params);
54  $this->message = 'The configuration '.$file_str.'is invalid'.$reason_str;
55  }
$params
Definition: disable.php:11
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file

Member Function Documentation

◆ getConfFile()

SimpleSAML\Error\ConfigurationError::getConfFile ( )

Get the configuration file that caused this exception.

Returns
null|string The configuration file that caused this exception.

Definition at line 74 of file ConfigurationError.php.

References SimpleSAML\Error\ConfigurationError\$config_file.

◆ getReason()

SimpleSAML\Error\ConfigurationError::getReason ( )

Get the reason for this exception.

Returns
null|string The reason for this exception.

Definition at line 63 of file ConfigurationError.php.

References SimpleSAML\Error\ConfigurationError\$reason.

Field Documentation

◆ $config_file

SimpleSAML\Error\ConfigurationError::$config_file
protected

◆ $reason


The documentation for this class was generated from the following file: