mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 17:12:41 +00:00
17 lines
455 B
PHP
17 lines
455 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
namespace JKingWeb\Arsse\REST\TinyTinyRSS;
|
|
|
|
class Exception extends \Exception {
|
|
protected $data = [];
|
|
|
|
public function __construct($msg = "UNSPECIFIED_ERROR", $data = [], $e = null) {
|
|
$this->data = $data;
|
|
parent::__construct($msg, 0, $e);
|
|
}
|
|
|
|
public function getData(): array {
|
|
$err = ['error' => $this->getMessage()];
|
|
return array_merge($err, $this->data, $err);
|
|
}
|
|
}
|