ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5
|
Handler outputing plaintext error messages. More...
Public Member Functions | |
__construct ($logger=null) | |
Constructor. More... | |
setLogger ($logger=null) | |
Set the output logger interface. More... | |
getLogger () | |
addTraceToOutput ($addTraceToOutput=null) | |
Add error trace to output. More... | |
addTraceFunctionArgsToOutput ($addTraceFunctionArgsToOutput=null) | |
Add error trace function arguments to output. More... | |
setTraceFunctionArgsOutputLimit ($traceFunctionArgsOutputLimit) | |
getTraceFunctionArgsOutputLimit () | |
Get the size limit in bytes of frame arguments var_dump output. More... | |
onlyForCommandLine ($onlyForCommandLine=null) | |
Restrict error handling to command line calls. More... | |
outputOnlyIfCommandLine ($outputOnlyIfCommandLine=null) | |
Output the error message only if using command line. More... | |
loggerOnly ($loggerOnly=null) | |
Only output to logger. More... | |
handle () | |
Public Member Functions inherited from Whoops\Handler\Handler | |
setRun (Run $run) | |
setInspector (Inspector $inspector) | |
setException (Exception $exception) | |
Data Fields | |
const | VAR_DUMP_PREFIX = ' | ' |
Data Fields inherited from Whoops\Handler\Handler | |
const | DONE = 0x10 |
Return constants that can be returned from Handler::handle to message the handler walker. More... | |
const | LAST_HANDLER = 0x20 |
const | QUIT = 0x30 |
Protected Attributes | |
$logger | |
Private Member Functions | |
isCommandLine () | |
Check, if possible, that this execution was triggered by a command line. More... | |
canProcess () | |
Test if handler can process the exception. More... | |
canOutput () | |
Test if handler can output to stdout. More... | |
getFrameArgsOutput (Frame $frame, $line) | |
Get the frame args var_dump. More... | |
Private Attributes | |
$addTraceToOutput = true | |
$addTraceFunctionArgsToOutput = false | |
$traceFunctionArgsOutputLimit = 1024 | |
$onlyForCommandLine = false | |
$outputOnlyIfCommandLine = true | |
$loggerOnly = false | |
Additional Inherited Members | |
Protected Member Functions inherited from Whoops\Handler\Handler | |
getRun () | |
getInspector () | |
getException () | |
Handler outputing plaintext error messages.
Can be used directly, or will be instantiated automagically by Whoops if passed to Run::pushHandler
Definition at line 20 of file PlainTextHandler.php.
Whoops\Handler\PlainTextHandler::__construct | ( | $logger = null | ) |
Constructor.
InvalidArgumentException | If argument is not null or a LoggerInterface |
\Psr\Log\LoggerInterface | null | $logger |
Definition at line 64 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$logger, and Whoops\Handler\PlainTextHandler\setLogger().
Whoops\Handler\PlainTextHandler::addTraceFunctionArgsToOutput | ( | $addTraceFunctionArgsToOutput = null | ) |
Add error trace function arguments to output.
Set to True for all frame args, or integer for the n first frame args.
bool | integer | null | $addTraceFunctionArgsToOutput |
Definition at line 117 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$addTraceFunctionArgsToOutput.
Referenced by Whoops\Handler\PlainTextHandler\getFrameArgsOutput().
Whoops\Handler\PlainTextHandler::addTraceToOutput | ( | $addTraceToOutput = null | ) |
Add error trace to output.
bool | null | $addTraceToOutput |
Definition at line 101 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$addTraceToOutput.
Referenced by Whoops\Handler\PlainTextHandler\getFrameArgsOutput().
|
private |
Test if handler can output to stdout.
Definition at line 216 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\isCommandLine(), Whoops\Handler\PlainTextHandler\loggerOnly(), and Whoops\Handler\PlainTextHandler\outputOnlyIfCommandLine().
Referenced by Whoops\Handler\PlainTextHandler\handle().
|
private |
Test if handler can process the exception.
Definition at line 207 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\isCommandLine(), and Whoops\Handler\PlainTextHandler\onlyForCommandLine().
Referenced by Whoops\Handler\PlainTextHandler\handle().
|
private |
Get the frame args var_dump.
\Whoops\Exception\Frame | $frame | [description] |
integer | $line | [description] |
Definition at line 228 of file PlainTextHandler.php.
References Whoops\Handler\Handler\$inspector, Whoops\Handler\PlainTextHandler\addTraceFunctionArgsToOutput(), Whoops\Handler\PlainTextHandler\addTraceToOutput(), Whoops\Exception\Frame\getArgs(), Whoops\Handler\Handler\getInspector(), and Whoops\Handler\PlainTextHandler\getTraceFunctionArgsOutputLimit().
Whoops\Handler\PlainTextHandler::getLogger | ( | ) |
Definition at line 91 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$logger.
Referenced by Whoops\Handler\PlainTextHandler\handle().
Whoops\Handler\PlainTextHandler::getTraceFunctionArgsOutputLimit | ( | ) |
Get the size limit in bytes of frame arguments var_dump output.
If the limit is reached, the var_dump output is discarded. Prevent memory limit errors.
Definition at line 147 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$traceFunctionArgsOutputLimit.
Referenced by Whoops\Handler\PlainTextHandler\getFrameArgsOutput().
Whoops\Handler\PlainTextHandler::handle | ( | ) |
Implements Whoops\Handler\HandlerInterface.
Definition at line 298 of file PlainTextHandler.php.
References Whoops\Handler\Handler\$exception, Whoops\Handler\PlainTextHandler\canOutput(), Whoops\Handler\PlainTextHandler\canProcess(), Whoops\Util\Misc\canSendHeaders(), Whoops\Handler\Handler\DONE, Whoops\Handler\Handler\getException(), Whoops\Handler\PlainTextHandler\getLogger(), and Whoops\Handler\Handler\QUIT.
|
private |
Check, if possible, that this execution was triggered by a command line.
Definition at line 198 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\canOutput(), and Whoops\Handler\PlainTextHandler\canProcess().
Whoops\Handler\PlainTextHandler::loggerOnly | ( | $loggerOnly = null | ) |
Only output to logger.
bool | null | $loggerOnly |
Definition at line 185 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$loggerOnly.
Referenced by Whoops\Handler\PlainTextHandler\canOutput().
Whoops\Handler\PlainTextHandler::onlyForCommandLine | ( | $onlyForCommandLine = null | ) |
Restrict error handling to command line calls.
bool | null | $onlyForCommandLine |
Definition at line 157 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$onlyForCommandLine.
Referenced by Whoops\Handler\PlainTextHandler\canProcess().
Whoops\Handler\PlainTextHandler::outputOnlyIfCommandLine | ( | $outputOnlyIfCommandLine = null | ) |
Output the error message only if using command line.
else, output to logger if available. Allow to safely add this handler to web pages.
bool | null | $outputOnlyIfCommandLine |
Definition at line 172 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$outputOnlyIfCommandLine.
Referenced by Whoops\Handler\PlainTextHandler\canOutput().
Whoops\Handler\PlainTextHandler::setLogger | ( | $logger = null | ) |
Set the output logger interface.
InvalidArgumentException | If argument is not null or a LoggerInterface |
\Psr\Log\LoggerInterface | null | $logger |
Definition at line 74 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$logger.
Referenced by Whoops\Handler\PlainTextHandler\__construct().
Whoops\Handler\PlainTextHandler::setTraceFunctionArgsOutputLimit | ( | $traceFunctionArgsOutputLimit | ) |
Definition at line 136 of file PlainTextHandler.php.
References Whoops\Handler\PlainTextHandler\$traceFunctionArgsOutputLimit.
|
private |
Definition at line 37 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\addTraceFunctionArgsToOutput().
|
private |
Definition at line 32 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\addTraceToOutput().
|
protected |
Definition at line 27 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\__construct(), Whoops\Handler\PlainTextHandler\getLogger(), and Whoops\Handler\PlainTextHandler\setLogger().
|
private |
Definition at line 57 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\loggerOnly().
|
private |
Definition at line 47 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\onlyForCommandLine().
|
private |
Definition at line 52 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\outputOnlyIfCommandLine().
|
private |
Definition at line 42 of file PlainTextHandler.php.
Referenced by Whoops\Handler\PlainTextHandler\getTraceFunctionArgsOutputLimit(), and Whoops\Handler\PlainTextHandler\setTraceFunctionArgsOutputLimit().
const Whoops\Handler\PlainTextHandler::VAR_DUMP_PREFIX = ' | ' |
Definition at line 22 of file PlainTextHandler.php.