0

我正在使用 Lumen 5.3.*,我需要QueryExceptionstorage/logs/lumen.log.

其他验证正在写入日志文件,但QueryException.

try {
    // throw here exception here
} catch (QueryException $e) {
    // do what ever
} catch (CustomException $e) {
    // do what ever
}

我已经CustomException扩展\Exception并使用Handler类来report()解释为什么我能够写入日志文件。但是QueryException没有。(QueryException是一个流明供应商文件)

我知道有可能只是\Log()赶上,QueryException但我想通过不这样说来使事情变得更清洁。

除了执行上述操作之外,还有其他方法可以做到这一点吗?

提前致谢!

4

0 回答 0