From 3e4374b0b938fcbddab16f874a9ca6f4c2c62a8b Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Sat, 25 Oct 2025 12:41:47 -0400 Subject: [PATCH] Add Throwable Methods --- src/Potter/Throwable/AbstractThrowable.php | 9 ++++++++- src/Potter/Throwable/ThrowableInterface.php | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Potter/Throwable/AbstractThrowable.php b/src/Potter/Throwable/AbstractThrowable.php index 12a6792..fdf976c 100644 --- a/src/Potter/Throwable/AbstractThrowable.php +++ b/src/Potter/Throwable/AbstractThrowable.php @@ -4,9 +4,16 @@ declare(strict_types=1); namespace Potter\Throwable; +use \Throwable as BaseThrowable; use \Exception; abstract class AbstractThrowable extends Exception implements ThrowableInterface { - + abstract public function getMessage(): string; + abstract public function getCode(): int; + abstract public function getFile(): string; + abstract public function getLine(): int; + abstract public function getTrace(): array; + abstract public function getTraceAsString(): string; + abstract public function getPrevious(): ?BaseThrowable; } diff --git a/src/Potter/Throwable/ThrowableInterface.php b/src/Potter/Throwable/ThrowableInterface.php index 05750d5..651b161 100644 --- a/src/Potter/Throwable/ThrowableInterface.php +++ b/src/Potter/Throwable/ThrowableInterface.php @@ -4,9 +4,16 @@ declare(strict_types=1); namespace Potter\Throwable; +use \Throwable as BaseThrowable; use \Potter\Stringable\StringableInterface; interface ThrowableInterface extends StringableInterface { - -} + public function getMessage(): string; + public function getCode(): int; + public function getFile(): string; + public function getLine(): int; + public function getTrace(): array; + public function getTraceAsString(): string; + public function getPrevious(): ?BaseThrowable; +} \ No newline at end of file