diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-09-26 20:36:04 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-09-26 20:36:04 +0200 |
commit | f3d7c26de1f575a14017a161ad1fdd2b93385e03 (patch) | |
tree | 065d6b0e12534a7371974bfb17e77c91d7b217d6 /libtests/qutil.cc | |
parent | 64546cfa0ddc2cf4c91e0865e979947c6b20ca46 (diff) | |
download | qpdf-f3d7c26de1f575a14017a161ad1fdd2b93385e03.tar.zst |
removed qexc; non-compatible ABI change
git-svn-id: svn+q:///qpdf/trunk@709 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libtests/qutil.cc')
-rw-r--r-- | libtests/qutil.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc index 0dfa0277..d1c090fb 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -1,4 +1,3 @@ - #include <iostream> #include <stdio.h> #include <sys/types.h> @@ -27,9 +26,9 @@ void string_conversion_test() // int_to_string bounds error std::cout << QUtil::int_to_string(1, 50) << std::endl; } - catch(QEXC::Internal &e) + catch (std::logic_error &e) { - std::cout << "exception 1: " << e.unparse() << std::endl; + std::cout << "exception 1: " << e.what() << std::endl; } try @@ -37,9 +36,9 @@ void string_conversion_test() // QUtil::int_to_string bounds error std::cout << QUtil::int_to_string(1, -50) << std::endl; } - catch(QEXC::Internal &e) + catch (std::logic_error& e) { - std::cout << "exception 2: " << e.unparse() << std::endl; + std::cout << "exception 2: " << e.what() << std::endl; } try @@ -47,9 +46,9 @@ void string_conversion_test() // QUtil::int_to_string bounds error std::cout << QUtil::int_to_string(-1, 49) << std::endl; } - catch(QEXC::Internal &e) + catch (std::logic_error& e) { - std::cout << "exception 3: " << e.unparse() << std::endl; + std::cout << "exception 3: " << e.what() << std::endl; } @@ -58,9 +57,9 @@ void string_conversion_test() // QUtil::double_to_string bounds error std::cout << QUtil::double_to_string(3.14159, 1024) << std::endl; } - catch(QEXC::Internal &e) + catch (std::logic_error& e) { - std::cout << "exception 4: " << e.unparse() << std::endl; + std::cout << "exception 4: " << e.what() << std::endl; } try @@ -68,9 +67,9 @@ void string_conversion_test() // QUtil::double_to_string bounds error std::cout << QUtil::double_to_string(1000.0, 95) << std::endl; } - catch(QEXC::Internal &e) + catch (std::logic_error& e) { - std::cout << "exception 5: " << e.unparse() << std::endl; + std::cout << "exception 5: " << e.what() << std::endl; } std::string embedded_null = "one"; @@ -101,9 +100,9 @@ void os_wrapper_test() std::cout << "after open" << std::endl; (void) close(fd); } - catch (QEXC::System& s) + catch (std::runtime_error& s) { - std::cout << "exception: " << s.unparse() << std::endl; + std::cout << "exception: " << s.what() << std::endl; } } @@ -118,9 +117,9 @@ void fopen_wrapper_test() std::cout << "after fopen" << std::endl; (void) fclose(f); } - catch (QEXC::System& s) + catch (std::runtime_error& s) { - std::cout << "exception: " << s.unparse() << std::endl; + std::cout << "exception: " << s.what() << std::endl; } } @@ -171,7 +170,7 @@ void to_utf8_test() { print_utf8(0x80000000UL); } - catch (QEXC::General& e) + catch (std::runtime_error& e) { std::cout << "0x80000000: " << e.what() << std::endl; } |