Add and use libclang_error exception class

This commit is contained in:
Jonathan Müller 2017-02-16 21:33:41 +01:00
commit a0c2eece5b
3 changed files with 32 additions and 2 deletions

View file

@ -73,7 +73,9 @@ namespace
auto exit_code = process.get_exit_status();
if (exit_code != 0)
DEBUG_UNREACHABLE(detail::assert_handler{}); // TODO: improve error handling
throw libclang_error("preprocessor: command '" + cmd
+ "' exited with non-zero exit code (" + std::to_string(exit_code)
+ ")");
return preprocessed;
}