Skip to content

Commit

Permalink
refactor: created root exception
Browse files Browse the repository at this point in the history
  • Loading branch information
petrknap committed Nov 9, 2024
1 parent 9789749 commit e1ab24d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/Exception/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace PetrKnap\Optional\Exception;

use Throwable;

/**
* @internal root exception
*/
interface Exception extends Throwable
{
}
4 changes: 1 addition & 3 deletions src/Exception/OptionalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace PetrKnap\Optional\Exception;

use Throwable;

interface OptionalException extends Throwable
interface OptionalException extends Exception
{
}
3 changes: 3 additions & 0 deletions src/Exception/TypedOptionalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace PetrKnap\Optional\Exception;

/**
* @todo do extend {@see Exception}, not {@see OptionalException}
*/
interface TypedOptionalException extends OptionalException
{
}

0 comments on commit e1ab24d

Please sign in to comment.