Add method to statically send error email
This commit is contained in:
parent
8a0024bcc4
commit
36403e6245
2 changed files with 24 additions and 0 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
All notable changes to `ExceptionHandler` will be documented in this file.
|
||||
|
||||
# version 0.1.0
|
||||
- Add a a method to manually send exception by email (plus the same to call statically).
|
||||
|
||||
# version 0.0.9
|
||||
- Multiline exception message in mail.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,28 @@ class ExceptionHandler extends Handler
|
|||
parent::report($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually send exception by email
|
||||
*
|
||||
* @param \Throwable $e
|
||||
* @return void
|
||||
*/
|
||||
public static function sendExceptionByEmailStatic(\Throwable $e)
|
||||
{
|
||||
app(self::class)->sendExceptionByEmail($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually send exception by email
|
||||
*
|
||||
* @param \Throwable $e
|
||||
* @return void
|
||||
*/
|
||||
public function sendExceptionByEmail(\Throwable $e)
|
||||
{
|
||||
$this->reportExceptionByEmail()($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Report sending mail closure
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue