diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-08-21 10:50:44 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-08-21 10:50:44 +0200 |
commit | 0c6fdbe12bbbb336348666b14b82096f24d5858b (patch) | |
tree | 8fad2829c55f94022e359fa8914e11f80a2afc2a /application/container/ContainerBuilder.php | |
parent | bedbb845eec20363b928b424143787dbe988eefe (diff) | |
download | Shaarli-0c6fdbe12bbbb336348666b14b82096f24d5858b.tar.gz Shaarli-0c6fdbe12bbbb336348666b14b82096f24d5858b.tar.zst Shaarli-0c6fdbe12bbbb336348666b14b82096f24d5858b.zip |
Move error handling to dedicated controller instead of middleware
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r-- | application/container/ContainerBuilder.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index 2e8c1ee3..4a1a6ea7 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -9,6 +9,7 @@ use Shaarli\Bookmark\BookmarkServiceInterface; | |||
9 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Feed\FeedBuilder; | 10 | use Shaarli\Feed\FeedBuilder; |
11 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
12 | use Shaarli\Front\Controller\Visitor\ErrorController; | ||
12 | use Shaarli\History; | 13 | use Shaarli\History; |
13 | use Shaarli\Http\HttpAccess; | 14 | use Shaarli\Http\HttpAccess; |
14 | use Shaarli\Netscape\NetscapeBookmarkUtils; | 15 | use Shaarli\Netscape\NetscapeBookmarkUtils; |
@@ -148,6 +149,10 @@ class ContainerBuilder | |||
148 | ); | 149 | ); |
149 | }; | 150 | }; |
150 | 151 | ||
152 | $container['errorHandler'] = function (ShaarliContainer $container): ErrorController { | ||
153 | return new ErrorController($container); | ||
154 | }; | ||
155 | |||
151 | return $container; | 156 | return $container; |
152 | } | 157 | } |
153 | } | 158 | } |