Commit 5320cb12 by Maarten L. Hekkelman

Fix validate pdbx

parent 30a2ebdb
......@@ -71,9 +71,7 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary)
{
std::error_code ec;
bool result = is_valid_pdbx_file(file, dictionary, ec);
if (ec != std::errc())
throw std::system_error(ec);
return result;
return result and ec == std::errc();
}
bool is_valid_pdbx_file(const file &file, std::error_code &ec)
......@@ -319,6 +317,9 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary, std::erro
ec = make_error_code(validation_error::not_valid_pdbx);
}
if (not result and ec == std::errc())
ec = make_error_code(validation_error::not_valid_pdbx);
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment