CallerException
Less than 1 minute
CallerException
Base exception that rewrites error location to the caller frame.
class CallerException extends \Hazaar\ExceptionThis abstract exception is useful for helper/wrapper APIs where the thrown exception should point to the consumer call site rather than the internal utility method that raised it.
Methods
__construct
Create a caller-aware exception.
public __construct(string $message, int $stepBack, int $code, ?\Exception $previous): voidAfter constructing the base exception, this constructor inspects the debug backtrace and rewrites $this->file and $this->line so the exception location reflects the selected caller frame.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string | exception message |
$stepBack | int | backtrace frame offset to use as caller location |
$code | int | exception code |
$previous | \Exception | previous exception for chaining |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000