protected function loadYAML($relativePath, $name)
{
$file_path = $this->bundlePath . $relativePath;
if (!file_exists($file_path)) {
throw new Exception('Bundle `' . $this->name . '` ' . $name . ' file `' . $file_path . '` not found.');
}
try {
$yaml = YAML::load($file_path);
} catch (Exception $e) {
throw new Exception('Bundle `' . $this->name . '` loading error: `' . $e->getMessage() . '` for ' . $name . ' at `' . $relativePath . '`.');
}
return $yaml;
}