Author: wyoung
Date: Mon Jan 11 22:30:15 2010
New Revision: 2617
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2617&view=rev
Log:
Suppressing spurious error message when SSQLS v2 parse fails.
Modified:
trunk/ssx/main.cpp
Modified: trunk/ssx/main.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/ssx/main.cpp?rev=2617&r1=2616&r2=2617&view=diff
==============================================================================
--- trunk/ssx/main.cpp (original)
+++ trunk/ssx/main.cpp Mon Jan 11 22:30:15 2010
@@ -93,17 +93,31 @@
return 2;
}
- if (ptree && (cmdline.output_sink() !=
CommandLine::ss_unknown)) {
- switch (cmdline.output_sink()) {
- case CommandLine::ss_ssqls2:
- return
generate_ssqls2(cmdline.output(), ptree) ? 0 : 2;
+ if (cmdline.output_sink() != CommandLine::ss_unknown) {
+ if (ptree) {
+ switch (cmdline.output_sink()) {
+ case CommandLine::ss_ssqls2:
+ if
(generate_ssqls2(cmdline.output(), ptree)) {
+ return 0;
+ }
+ else {
+ return 2;
+ }
- default:
- cerr << "Sorry, I don't yet know what
to do with "
- "sink type " <<
int(cmdline.output_sink()) <<
- '!' << endl;
- return 2;
+ default:
+ cerr << "Sorry, I don't yet
know what to do "
+ "with sink type
" <<
+
int(cmdline.output_sink()) << '!' <<
+ endl;
+ return 2;
+ }
}
+ else {
+ // Depending on someone farther up the line to
write
+ // the error message, explaining why we didn't
get a
+ // parse tree.
+ return 2;
+ }
}
else {
cerr << "Sorry, I don't know how to write C++ output
yet." <<
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits