Author: wyoung
Date: Sat Dec 8 00:04:25 2007
New Revision: 1982
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1982&view=rev
Log:
If exceptions are suppressed on Row, operator[](const char*) will now
return an empty value; BadFieldName is no longer a mandatory exception.
This is probably not necessary now, but it will be in SSQLSv2, with the
subset population changes: it will be "legal" to ask for a field in a
Row that doesn't exist. We'll use NoExceptions(row) in the populate
method.
Modified:
trunk/lib/row.cpp
Modified: trunk/lib/row.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.cpp?rev=1982&r1=1981&r2=1982&view=diff
==============================================================================
--- trunk/lib/row.cpp (original)
+++ trunk/lib/row.cpp Sat Dec 8 00:04:25 2007
@@ -64,7 +64,13 @@
return at(si);
}
else {
- throw BadFieldName(field);
+ if (throw_exceptions()) {
+ throw BadFieldName(field);
+ }
+ else {
+ static value_type empty;
+ return empty;
+ }
}
}
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits