Updated Java, C++, Python, Rust worker programs to catch the new exception; removed error message string comparisons.

This commit is contained in:
Project Nayuki
2018-10-26 02:42:35 +00:00
parent 8da8107cc2
commit c36c4a28eb
4 changed files with 5 additions and 13 deletions
+1 -5
View File
@@ -91,11 +91,7 @@ int main() {
std::cout << (qr.getModule(x, y) ? 1 : 0) << 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;
}
} catch (const qrcodegen::data_too_long &ex) {
std::cout << -1 << std::endl;
}
std::cout << std::flush;