Skip to content

Commit

Permalink
Halt HDT file creation on input error.
Browse files Browse the repository at this point in the history
This avoids the generation of incomplete HDT files.
  • Loading branch information
RubenVerborgh committed Dec 4, 2016
1 parent 417e1af commit d3b02a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hdt-lib/src/rdf/RDFParserSerd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ SerdStatus hdtserd_error(void* handle, const SerdError* error) {
//RDFParserSerd *raptorParser = reinterpret_cast<RDFParserSerd *>(handle);
//raptorParser->error.append("File: "+e->filename+" Line "+e->line+" Col "+e->col+" Parsing Error: "+e->fmt);
fprintf(stderr, error->fmt, error->args);
return SERD_SUCCESS;
throw std::runtime_error("Error parsing input.");
return SERD_ERR_BAD_SYNTAX;
}

/**
Expand Down

0 comments on commit d3b02a9

Please sign in to comment.