PHP code example of cplugins / hexception

1. Go to this page and download the library: Download cplugins/hexception library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cplugins / hexception example snippets


app/Listener/QueueHandleListener.php 目录下 process 方法
case $event instanceof FailedHandle:下面注释掉
// $this->logger->error(sprintf('[%s] Failed %s.', $date, $jobClass));
// $this->logger->error($this->formatter->format($event->getThrowable()));

添加以下代码
$log = new LogHelper();
$log->error("异常捕获", $event->getThrowable());