Throw exceptions if errors during parsing