-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Vinelab/error-handling
Apply contextual binding for exception handler
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,13 @@ | |
|
||
namespace Vinelab\Bowler; | ||
|
||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
use Illuminate\Support\ServiceProvider; | ||
use Vinelab\Bowler\Console\Commands\QueueCommand; | ||
use Vinelab\Bowler\Console\Commands\ConsumeCommand; | ||
use Vinelab\Bowler\Console\Commands\SubscriberCommand; | ||
use Vinelab\Bowler\Console\Commands\ConsumerHealthCheckCommand; | ||
use Vinelab\Bowler\Contracts\BowlerExceptionHandler; | ||
use Vinelab\Bowler\Exceptions\Handler as BowlerExceptionHandler; | ||
|
||
/** | ||
* @author Ali Issa <[email protected]> | ||
|
@@ -63,7 +64,9 @@ public function register() | |
return new Connection($rbmqHost, $rbmqPort, $rbmqUsername, $rbmqPassword, $rbmqConnectionTimeout, $rbmqReadWriteTimeout, $rbmqHeartbeat, $rbmqVhost); | ||
}); | ||
|
||
$this->app->bind(BowlerExceptionHandler::class, $this->app->getNamespace().'Exceptions\Handler'); | ||
$this->app->when(BowlerExceptionHandler::class) | ||
->needs(ExceptionHandler::class) | ||
->give($this->app->getNamespace().'Exceptions\Handler'); | ||
|
||
//register command | ||
$this->commands([ | ||
|