Skip to content

Commit e7fe716

Browse files
committed
Restore OCMS exception handler
1 parent 4e4e091 commit e7fe716

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Foundation/Configuration/ApplicationBuilder.php

+16-16
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ public function withKernels()
3434
* @param callable|null $using
3535
* @return $this
3636
*/
37-
// public function withExceptions(?callable $using = null)
38-
// {
39-
// $this->app->singleton(
40-
// \Illuminate\Contracts\Debug\ExceptionHandler::class,
41-
// \October\Rain\Foundation\Exception\Handler::class
42-
// );
43-
44-
// $using ??= fn () => true;
45-
46-
// $this->app->afterResolving(
47-
// \Illuminate\Foundation\Exceptions\Handler::class,
48-
// fn ($handler) => $using(new Exceptions($handler)),
49-
// );
50-
51-
// return $this;
52-
// }
37+
public function withExceptions(?callable $using = null)
38+
{
39+
$this->app->singleton(
40+
\Illuminate\Contracts\Debug\ExceptionHandler::class,
41+
\October\Rain\Foundation\Exception\Handler::class
42+
);
43+
44+
$using ??= fn () => true;
45+
46+
$this->app->afterResolving(
47+
\Illuminate\Foundation\Exceptions\Handler::class,
48+
fn ($handler) => $using(new Exceptions($handler)),
49+
);
50+
51+
return $this;
52+
}
5353
}

0 commit comments

Comments
 (0)