mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* 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
22 lines
405 B
PHP
22 lines
405 B
PHP
<?php
|
|
|
|
namespace LibreNMS\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
class JsonAppBlankJsonException 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;
|
|
}
|
|
}
|