Skip to content

Commit bef28f4

Browse files
committed
remove extra exception
1 parent a803720 commit bef28f4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Router.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use MiladRahimi\PhpRouter\Services\Publisher;
1717
use Psr\Container\ContainerInterface;
1818
use Laminas\Diactoros\ServerRequestFactory;
19-
use RuntimeException;
2019

2120
class Router
2221
{
@@ -99,11 +98,7 @@ public static function create(): self
9998
$container->singleton(Repository::class, new Repository());
10099
$container->singleton(Publisher::class, HttpPublisher::class);
101100

102-
try {
103-
return $container->instantiate(Router::class);
104-
} catch (ContainerException $e) {
105-
throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
106-
}
101+
return $container->instantiate(Router::class);
107102
}
108103

109104
/**

0 commit comments

Comments
 (0)