[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> ErrorHandler.php (summary)

(no description)

File Size: 141 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ErrorHandler:: (6 methods):
  register()
  fatalException()
  showExceptionMsg()
  fatalShutdown()
  logException()
  guessPlugin()


Class: ErrorHandler  - X-Ref

Manage the global handling of errors and exceptions

Developer may use this to log and display exceptions themselves
register()   X-Ref
Register the default error handling


fatalException($e)   X-Ref
Default Exception handler to show a nice user message before dieing

The exception is logged to the error log

param: \Throwable $e

showExceptionMsg($e, $intro = 'Error!')   X-Ref
Convenience method to display an error message for the given Exception

param: \Throwable $e
param: string $intro

fatalShutdown()   X-Ref
Last resort to handle fatal errors that still can't be caught


logException($e)   X-Ref
Log the given exception to the error log

return: bool false if the logging failed
param: \Throwable $e

guessPlugin($e)   X-Ref
Checks the the stacktrace for plugin files

return: false|string
param: \Throwable $e