1<?php
2
3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4// See the LICENCE file in the repository root for full licence text.
5
6namespace App\Exceptions;
7
8use Exception;
9
10class UserVerificationException extends Exception
11{
12 private $reasonKey;
13 private $shouldReissue;
14
15 public function __construct(string $reasonKey, bool $shouldReissue)
16 {
17 $this->reasonKey = $reasonKey;
18 $this->shouldReissue = $shouldReissue;
19
20 $message = osu_trans("user_verification.errors.{$reasonKey}");
21
22 parent::__construct($message);
23 }
24
25 public function reasonKey()
26 {
27 return $this->reasonKey;
28 }
29
30 public function shouldReissue()
31 {
32 return $this->shouldReissue;
33 }
34}