Add exception when json files can not be read

main
Jordi Boggiano 13 years ago
parent 450095e61d
commit 17286e993c

@ -58,6 +58,9 @@ class JsonFile
));
$json = file_get_contents($this->path, false, $context);
if (!$json) {
throw new \RuntimeException('Could not read '.$this->path.', you are probably offline');
}
return static::parseJson($json);
}

Loading…
Cancel
Save