Skip to content

Commit 2fdbcfb

Browse files
[FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors
1 parent b6768a3 commit 2fdbcfb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Loader/FileLoader.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ public function import($resource, $type = null, $ignoreErrors = false, $sourceRe
103103
}
104104
self::$loading[$resource] = true;
105105

106-
$ret = $loader->load($resource, $type);
106+
try {
107+
$ret = $loader->load($resource, $type);
108+
} catch (\Exception $e) {
109+
unset(self::$loading[$resource]);
110+
throw $e;
111+
}
107112

108113
unset(self::$loading[$resource]);
109114

0 commit comments

Comments
 (0)