Skip to content

Commit

Permalink
fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurHlt committed Mar 17, 2015
1 parent 2ab4ff4 commit 9084430
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Arhframe/Yamlarh/Yamlarh.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function inject($value, &$arrayToReturn, $completeArray)
return $this->insertVar($value, $arrayToReturn, $completeArray);
}
if ($value[0] == "!" && $value[1] == "!") {
return $this->insertObject($value, $arrayToReturn);
return $this->insertObject($value);
}

return $value;
Expand Down Expand Up @@ -237,7 +237,6 @@ private function getComplexeVar($var, $values)

/**
* @param File $file
* @throws YamlarhException
*/
private function parseFile(File $file)
{
Expand Down Expand Up @@ -268,7 +267,7 @@ private function parseFile(File $file)
/**
* @param $fileName
* @param File $file
* @throws YamlarhException
* @throws \Exception
*/
private function getFromImport($fileName, File $file)
{
Expand All @@ -282,7 +281,7 @@ private function getFromImport($fileName, File $file)
$fileFinalName = $file->getFolder() . '/' . $fileName;
}
if (!is_file($fileFinalName)) {
throw new YamlarhException("The yml file " . $file->absolute() . " can't found yml file " . $fileName . " for import");
throw new \Exception("The yml file " . $file->absolute() . " can't found yml file " . $fileName . " for import");
}
$this->parseFile(new File($fileFinalName));

Expand Down

0 comments on commit 9084430

Please sign in to comment.