librenms/LibreNMS/Exceptions/JsonAppParsingFailedException.php
VVelox c3007b483a add json_app_get and convert fail2ban over to JSON (#8571)
* add json_app_get function

* add numeric testing and version support

* now use json_app_get

* remove some unneeded code

* update the docs for json_app_get some more

* make the format checker happy

* add in min version support and now take extend name instead of the partial OID

* hmm... don't make min version optional

* add Exception usage for this all make min version actually work

* minor formatting cleanup

* minor style cleanup

* update json_app_get with $throw_me setting

* Use exceptions to fully handle errors.
Always update the application.  Include error message for use in UI.
Move data to data key for easier parsing.
Add test data

* make a few changes to the lovely changes from @murrant

* style cleanup

* now attempt parsing it the old way if a error of -5 is returned

* add new exceptions and rework them all

* add new exceptions and min version 0 no longer bypasses the key checks

* redo the error codes a bit and improve the comment about it all

* fix a a bit of formatting

* added JsonAppException and make the other JsonApp stuff a sub of it

* note JsonAppException

* fix class creation

* JsonAppBlank now extends JsonApp

* doh! add <?php

* update the poller to properly use the new exceptions

* no longer check for error twice and make sure the data key is present

* cleanup processing of legacy scripts

* tweak this a bit

* white space fix

* fix the tests for fail2ban
2018-05-25 21:16:16 -05:00

22 lines
409 B
PHP

<?php
namespace LibreNMS\Exceptions;
use Throwable;
class JsonAppParsingFailedException extends JsonAppException
{
private $output;
public function __construct($message, $output, $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
$this->output = $output;
}
public function getOutput()
{
return $this->output;
}
}