diff --git a/modules/util/Util/JSON.pm b/modules/util/Util/JSON.pm index c81bd7bc25ca481c6837b6d9a352611854b83d00..e543c65ab02bff71ddf3a6453279fdabbd4a5a0c 100755 --- a/modules/util/Util/JSON.pm +++ b/modules/util/Util/JSON.pm @@ -24,7 +24,16 @@ sub read_json_file =end comment =cut - my $json_text= read_text($fnm); + my $json_text; + eval + { + $json_text= read_text($fnm); + }; + + if ($@) + { + return undef; + } from_json($json_text); }