| 1 |
<?php |
| 2 |
/* |
| 3 |
* This file is part of the PHPASN1 library. |
| 4 |
* |
| 5 |
* Copyright © Friedrich Große <[email protected]> |
| 6 |
* |
| 7 |
* For the full copyright and license information, please view the LICENSE |
| 8 |
* file that was distributed with this source code. |
| 9 |
*/ |
| 10 |
|
| 11 |
namespace WP_DEFENDER_VENDOR\FG\ASN1\Exception; |
| 12 |
|
| 13 |
class ParserException extends \Exception |
| 14 |
{ |
| 15 |
private $errorMessage; |
| 16 |
private $offset; |
| 17 |
|
| 18 |
public function __construct($errorMessage, $offset) |
| 19 |
{ |
| 20 |
$this->errorMessage = $errorMessage; |
| 21 |
$this->offset = $offset; |
| 22 |
parent::__construct("ASN.1 Parser Exception at offset {$this->offset}: {$this->errorMessage}"); |
| 23 |
} |
| 24 |
|
| 25 |
public function getOffset() |
| 26 |
{ |
| 27 |
return $this->offset; |
| 28 |
} |
| 29 |
} |
| 30 |
|