<?php

namespace Modules\Common\Exceptions;

use Catch\Exceptions\CatchException;
use Throwable;

class CommonBusinessException extends CatchException
{
    public function __construct($message = "", $code = 0, Throwable $previous = null)
    {
        parent::__construct($message, $code);
    }

    public static function throwError($error, Throwable $previous = null) {
        throw (new static($error[1], $error[0], $previous));
    }
}
