projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e89a5aa
)
Catch exceptions a little better for yp2 program
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 19 Jan 2006 09:32:08 +0000
(09:32 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 19 Jan 2006 09:32:08 +0000
(09:32 +0000)
src/yp2_prog.cpp
patch
|
blob
|
history
diff --git
a/src/yp2_prog.cpp
b/src/yp2_prog.cpp
index
244f3b0
..
4109c86
100644
(file)
--- a/
src/yp2_prog.cpp
+++ b/
src/yp2_prog.cpp
@@
-1,4
+1,4
@@
-/* $Id: yp2_prog.cpp,v 1.1 2006-01-16 11:22:56 adam Exp $
+/* $Id: yp2_prog.cpp,v 1.2 2006-01-19 09:32:08 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
Copyright (c) 2005, Index Data.
%LICENSE%
@@
-66,19
+66,21
@@
int main(int argc, char **argv)
}
if (doc)
{
}
if (doc)
{
- yp2::FactoryStatic factory;
- yp2::RouterFleXML router(doc, factory);
-
- yp2::Package pack;
-
- pack.router(router).move();
-
+ try {
+ yp2::FactoryStatic factory;
+ yp2::RouterFleXML router(doc, factory);
+ yp2::Package pack;
+ pack.router(router).move();
+ }
+ catch (std::runtime_error &e) {
+ std::cout << "std::runtime error: " << e.what() << "\n";
+ exit(1);
+ }
xmlFreeDoc(doc);
}
}
catch ( ... ) {
std::cerr << "Unknown Exception" << std::endl;
xmlFreeDoc(doc);
}
}
catch ( ... ) {
std::cerr << "Unknown Exception" << std::endl;
- throw;
std::exit(1);
}
std::exit(0);
std::exit(1);
}
std::exit(0);