public function throwError($msg = null)
{
if (func_num_args() > 1) {
$msg = call_user_func_array("sprintf", func_get_args());
}
if ($this->sourcePos >= 0 && isset($this->sourceParser)) {
$this->sourceParser->throwParseError($msg, $this->sourcePos);
}
throw new Exception($msg);
}