1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 17:12:41 +00:00
Arsse/lib/REST/TinyTinyRSS/Exception.php
J. King 8487a56a60 Tests for TTRSS session handling and version/level reporting
- Fixes #73
- Fixes #74
- Fixes #75
- Fixes #76
- Fixes #77
2017-09-25 10:08:37 -04:00

17 lines
No EOL
454 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);
}
}