Add exception verbosity

This commit is contained in:
Romain Neutron
2012-01-04 18:05:40 +01:00
parent 9835fa1ff7
commit d04ba1e76c

View File

@@ -1097,7 +1097,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
foreach ($mandatoryParams as $param) foreach ($mandatoryParams as $param)
{ {
if (!array_key_exists($param, $params)) if (!array_key_exists($param, $params))
throw new Exception_InvalidArgument(); {
throw new Exception_InvalidArgument(sprintf('Invalid metadata, missing key %s', $param));
}
} }
if (!is_array($params['value'])) if (!is_array($params['value']))