CommandTrait.php 371 B

12345678910111213141516171819202122
  1. <?php
  2. namespace UCore\Command;
  3. use UCore\Helper\Logger;
  4. /**
  5. * 命令公共特性
  6. */
  7. trait CommandTrait
  8. {
  9. /**
  10. * 处理命令执行过程中的异常
  11. *
  12. * @param \Exception $exception 捕获到的异常
  13. * @return void
  14. */
  15. public function callException(\Exception $exception)
  16. {
  17. Logger::exception('error', $exception);
  18. }
  19. }