ChannelBusinessException.php 422 B

1234567891011121314151617
  1. <?php
  2. namespace Modules\Channel\Exceptions;
  3. use Throwable;
  4. class ChannelBusinessException extends \RuntimeException
  5. {
  6. public function __construct($message = "", $code = 0, Throwable $previous = null)
  7. {
  8. parent::__construct($message, $code, $previous);
  9. }
  10. public static function throwError($error, Throwable $previous = null) {
  11. throw (new static($error[1], $error[0], $previous));
  12. }
  13. }