Improved error reporting

This commit is contained in:
2016-04-19 16:37:31 +02:00
parent 79bc0a92d9
commit fceb4c4966
5 changed files with 17 additions and 20 deletions

View File

@ -21,7 +21,9 @@ class Hotfix
protected function load($hotfix)
{
// echo $hotfix."\n\n";
if (strpos($hotfix, "\n---\n")===false) {
throw new \Exception("Hotfix is missing a proper header, is line endings wrong?");
}
list ($header, $body) = explode("\n---\n", $hotfix, 2);
$header = Yaml::parse($header);