public function deleteSaved()
{
$exceptions = [];
while ($model = array_pop($this->saved)) {
try {
if (!$this->delete($model)) {
throw new DeleteFailedException(get_class($model));
}
} catch (Exception $e) {
$exceptions[] = $e;
}
}
// If we ran into any problems, throw the exception now
if ($exceptions) {
throw new DeletingFailedException($exceptions);
}
}