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/qexc.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/qexc.cc')
-rw-r--r-- | libtests/qexc.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/libtests/qexc.cc b/libtests/qexc.cc deleted file mode 100644 index 6a89f68d..00000000 --- a/libtests/qexc.cc +++ /dev/null @@ -1,53 +0,0 @@ - -#include <qpdf/QEXC.hh> -#include <iostream> -#include <errno.h> -#include <stdlib.h> - -void f(int n) -{ - switch (n) - { - case 0: - throw QEXC::General("general exception"); - break; - - case 1: - throw QEXC::Internal("internal error"); - break; - - case 2: - throw QEXC::System("doing something", EINVAL); - break; - } -} - -int main(int argc, char* argv[]) -{ - if (argc != 2) - { - std::cerr << "usage: qexc n" << std::endl; - exit(2); - } - - try - { - f(atoi(argv[1])); - } - catch (QEXC::General& e) - { - std::cerr << "exception: " << e.unparse() << std::endl; - std::cerr << "what: " << e.what() << std::endl; - exit(2); - } - catch (std::exception& e) - { - std::cerr << "uncaught exception: " << e.what() << std::endl; - exit(3); - } - catch (...) - { - exit(4); - } - return 0; -} |