Exception Collector
Captures uncaught exceptions with full stack traces and exception chains (previous exceptions).

What It Captures
| Field | Description |
|---|---|
class | Exception class name |
message | Exception message |
file | File where the exception was thrown |
line | Line number |
code | Exception code |
trace | Stack trace array |
traceAsString | Stack trace as formatted string |
Data Schema
Exceptions are serialized as an array (chain from outermost to innermost):
[
{
"class": "RuntimeException",
"message": "Something went wrong",
"file": "/app/src/Service.php",
"line": 42,
"code": 0,
"trace": [...],
"traceAsString": "#0 /app/src/Controller.php(15): ..."
},
{
"class": "InvalidArgumentException",
"message": "Original cause",
"file": "/app/src/Validator.php",
"line": 88,
"code": 0,
"trace": [...],
"traceAsString": "..."
}
]Summary (shown in debug entry list):
{
"exception": {
"class": "RuntimeException",
"message": "Something went wrong",
"file": "/app/src/Service.php",
"line": 42,
"code": 0
}
}Contract
use AppDevPanel\Kernel\Collector\ExceptionCollector;
$collector->collect(throwable: $exception);INFO
ExceptionCollectorAppDevPanel\Kernel\Collector\ExceptionCollectorCollects Exception data during application lifecycle. implements SummaryCollectorInterfaceAppDevPanel\Kernel\Collector\SummaryCollectorInterfaceSummary data collector responsibility is to collect summary data for a collector. Summary is used to display a list of previous requests and select one to display full info. Its data set is specific to the list and is reduced compared to full data collected in {@see CollectorInterface}. and depends on TimelineCollectorAppDevPanel\Kernel\Collector\TimelineCollectorCollects Timeline data during application lifecycle..
How It Works
Framework adapters hook into the error handling pipeline to capture uncaught exceptions. The collector traverses the exception chain via getPrevious() and serializes each exception in the chain.
Debug Panel
- Exception header — class name, message, and throw location
- Chained exceptions — previous exceptions shown in a collapsible chain
- Syntax-highlighted source code — shows the file around the throw line
- Full stack trace — expandable with file links for IDE integration