mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* add lnms_return_optimizer * add compression test using zfs-v1 * minor style fix * save the original output if not json * replace gzinflate with gzdecode as apparently that does not require yanking the header * Minor comment cleanup. Also note it in the application notes as well. * update docs on how it is called * update the spelling of it in a few places * and a few more * dev docs updated a bit * the suricata extend has native support for this now * add exception handling for base64 and gzip decoding failure * minor cleanup for new exceptions * minor misc changes * minor formatting fix * more phpdoc tweaks * minor formatting tweak * remember to actually include the new exceptions * more phpdoc tweaking * correct name in JsonAppGzipDecodeException * add debug and verbose output * style fix * not base64 is it starts with a line with only a integer
34 lines
661 B
PHP
34 lines
661 B
PHP
<?php
|
|
|
|
namespace LibreNMS\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
class JsonAppBase64DecodeException extends JsonAppException
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $output;
|
|
|
|
/**
|
|
* @param string $message The message.
|
|
* @param string $output The return from snmpget.
|
|
* @param int $code Error code.
|
|
* @return static
|
|
*/
|
|
public function __construct($message, $output, $code = 0, Throwable $previous = null)
|
|
{
|
|
parent::__construct($message, $code, $previous);
|
|
$this->output = $output;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getOutput()
|
|
{
|
|
return $this->output;
|
|
}
|
|
}
|