Skip to content

Commit

Permalink
Add component-level exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaposa committed Jul 5, 2020
1 parent cc775e7 commit 9636db4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Exception/CannotUseRateLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

use RuntimeException;

final class CannotUseRateLimiter extends RuntimeException
final class CannotUseRateLimiter extends RuntimeException implements RateLimitException
{
}
2 changes: 1 addition & 1 deletion src/Exception/LimitExceeded.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use RateLimit\Rate;
use RuntimeException;

final class LimitExceeded extends RuntimeException
final class LimitExceeded extends RuntimeException implements RateLimitException
{
/** @var string */
protected $identifier;
Expand Down
11 changes: 11 additions & 0 deletions src/Exception/RateLimitException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

namespace RateLimit\Exception;

use Throwable;

interface RateLimitException extends Throwable
{
}

0 comments on commit 9636db4

Please sign in to comment.