Compare commits

..

7 Commits

4 changed files with 21 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2025 Potter
Copyright (c) 2025 Jay Potter
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Potter\Throwable;
use \Throwable as BaseThrowable;
use \Exception;
abstract class AbstractThrowable extends Exception implements ThrowableInterface

View File

@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Potter\Throwable;
abstract class Throwable extends AbstractThrowable
{
}

View File

@@ -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();
public function getFile(): string;
public function getLine(): int;
public function getTrace(): array;
public function getTraceAsString(): string;
public function getPrevious(): ?BaseThrowable;
}