-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Exceptions
Mathieu Nayrolles edited this page Jan 20, 2016
·
1 revision
Exceptions Class
- Class name: CI_Exceptions
- Namespace:
public integer $ob_level
Nesting level of the output buffering mechanism
- Visibility: public
public array $levels = array(E_ERROR => 'Error', E_WARNING => 'Warning', E_PARSE => 'Parsing Error', E_NOTICE => 'Notice', E_CORE_ERROR => 'Core Error', E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Runtime Notice')
List of available error levels
- Visibility: public
void CI_Exceptions::__construct()
Class constructor
- Visibility: public
void CI_Exceptions::log_exception(integer $severity, string $message, string $filepath, integer $line)
Exception Logger
Logs PHP generated error messages
- Visibility: public
- $severity integer - <p>Log level</p>
- $message string - <p>Error message</p>
- $filepath string - <p>File path</p>
- $line integer - <p>Line number</p>
void CI_Exceptions::show_404(string $page, boolean $log_error)
404 Error Handler
- Visibility: public
- $page string - <p>Page URI</p>
- $log_error boolean - <p>Whether to log the error</p>
string CI_Exceptions::show_error(string $heading, string|array<mixed,string> $message, string $template, integer $status_code)
General Error Page
Takes an error message as input (either as a string or an array) and displays it using the specified template.
- Visibility: public
- $heading string - <p>Page heading</p>
- $message string|array<mixed,string> - <p>Error message</p>
- $template string - <p>Template name</p>
- $status_code integer - <p>(default: 500)</p>
mixed CI_Exceptions::show_exception(\Exception $exception)
- Visibility: public
- $exception Exception
string CI_Exceptions::show_php_error(integer $severity, string $message, string $filepath, integer $line)
Native PHP error handler
- Visibility: public
- $severity integer - <p>Error level</p>
- $message string - <p>Error message</p>
- $filepath string - <p>File path</p>
- $line integer - <p>Line number</p>