aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Exception/AuthException.php
blob: 4b558a4c663d326f8d2c37811961eb77beea39a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
namespace Digitigrade\Exception;

use Digitigrade\Model\Instance;

class AuthException extends \RuntimeException {
    protected Instance $instance;

    public function __construct(Instance $instance, \Throwable $previous = null) {
        parent::__construct("I'm not authenticated with $instance->domain", previous: $previous);
        $this->instance = $instance;
    }

    public function getInstance(): Instance {
        return $this->instance;
    }
}