Throw exceptions for parse errors.