mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-13 18:50:01 -04:00
Do not die in tests if JSON Parsing fails
This commit is contained in:
parent
5ad1c0e821
commit
18dedf3463
1 changed files with 5 additions and 1 deletions
|
|
@ -17,6 +17,8 @@ use File::Basename;
|
|||
|
||||
use JSON;
|
||||
|
||||
use feature 'try';
|
||||
|
||||
use IO::File;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
@ -619,7 +621,9 @@ sub testCmd {
|
|||
chomp $output;
|
||||
$object->output($output);
|
||||
|
||||
$object->{'mp_test_result'} = decode_json($output);
|
||||
try {
|
||||
$object->{'mp_test_result'} = decode_json($output);
|
||||
}
|
||||
|
||||
alarm(0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue