Fixed C++ worker program due to changing exceptions from string to object (related to commit 4ca232b949).

This commit is contained in:
Project Nayuki 2018-08-26 03:31:09 +00:00
parent 5073db4487
commit 868b387d9a
1 changed files with 3 additions and 3 deletions

View File

@ -91,9 +91,9 @@ int main() {
std::cout << (qr.getModule(x, y) ? 1 : 0) << std::endl;
}
} catch (const char *msg) {
if (strcmp(msg, "Data too long") != 0) {
std::cerr << msg << std::endl;
} catch (const std::length_error &ex) {
if (strcmp(ex.what(), "Data too long") != 0) {
std::cerr << ex.what() << std::endl;
return EXIT_FAILURE;
}
std::cout << -1 << std::endl;