protected function setError($message, array $lastError = null)
    {
        $this->isError = true;
        $this->errMessage = $message;

        if ($lastError !== null) {
            $this->errMessage .= ': ' . $lastError['message'];
            $this->errFile = $lastError['file'];
            $this->errLine = $lastError['line'];
        }
    }