79 'Argument to ' . __METHOD__ .
80 " must be a valid Logger Interface (aka. Monolog), " .
103 if (func_num_args() == 0) {
119 if (func_num_args() == 0) {
159 if (func_num_args() == 0) {
174 if (func_num_args() == 0) {
187 if (func_num_args() == 0) {
200 return PHP_SAPI ==
'cli';
243 "\n%sArguments dump length greater than %d Bytes. Discarded.",
244 self::VAR_DUMP_PREFIX,
249 return sprintf(
"\n%s",
250 preg_replace(
'/^/m', self::VAR_DUMP_PREFIX, ob_get_clean())
258 private function getTraceOutput()
266 $response =
"\nStack trace:";
269 foreach ($frames as $frame) {
271 $class = $frame->getClass();
273 $template =
"\n%3d. %s->%s() %s:%d%s";
276 $template =
"\n%3d. %s%s() %s:%d%s";
279 $response .= sprintf(
283 $frame->getFunction(),
306 $response = sprintf(
"%s: %s in file %s on line %d%s\n",
311 $this->getTraceOutput()
322 if (class_exists(
'\Whoops\Util\Misc')
324 header(
'Content-Type: text/plain');
$traceFunctionArgsOutputLimit
Handler outputing plaintext error messages.
Whoops - php errors for cool kids.
canProcess()
Test if handler can process the exception.
onlyForCommandLine($onlyForCommandLine=null)
Restrict error handling to command line calls.
const DONE
Return constants that can be returned from Handler::handle to message the handler walker...
isCommandLine()
Check, if possible, that this execution was triggered by a command line.
Whoops - php errors for cool kids.
getTraceFunctionArgsOutputLimit()
Get the size limit in bytes of frame arguments var_dump output.
addTraceFunctionArgsToOutput($addTraceFunctionArgsToOutput=null)
Add error trace function arguments to output.
$addTraceFunctionArgsToOutput
setTraceFunctionArgsOutputLimit($traceFunctionArgsOutputLimit)
static canSendHeaders()
Can we at this point in time send HTTP headers?
Abstract implementation of a Handler.
Describes a logger instance.
setLogger($logger=null)
Set the output logger interface.
canOutput()
Test if handler can output to stdout.
loggerOnly($loggerOnly=null)
Only output to logger.
addTraceToOutput($addTraceToOutput=null)
Add error trace to output.
getFrameArgsOutput(Frame $frame, $line)
Get the frame args var_dump.
outputOnlyIfCommandLine($outputOnlyIfCommandLine=null)
Output the error message only if using command line.
__construct($logger=null)
Constructor.