summaryrefslogtreecommitdiff
path: root/stdafx.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-02-20 10:48:32 -0500
committerAaron <aaron@10gen.com>2009-02-20 10:48:32 -0500
commit6f25a72ec32be1dd6602e7fa5394ce9706c0242e (patch)
tree2bfc2145b12d6698156d16749809ab3732b39cce /stdafx.h
parent406442dec4ee513d5f68971e22d2e9acfd0c56a2 (diff)
downloadmongo-6f25a72ec32be1dd6602e7fa5394ce9706c0242e.tar.gz
'better' LazyString
Diffstat (limited to 'stdafx.h')
-rw-r--r--stdafx.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/stdafx.h b/stdafx.h
index 6b79f5287da..43d0e531886 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -70,12 +70,6 @@ using namespace std;
namespace mongo {
- class Stringable {
- public:
- virtual ~Stringable() throw() {}
- virtual string toString() const = 0;
- };
-
/* these are manipulated outside of mutexes, so be careful */
struct Assertion {
Assertion() {
@@ -113,12 +107,13 @@ namespace mongo {
/* last assert of diff types: regular, wassert, msgassert, uassert: */
extern Assertion lastAssert[4];
- class DBException : public exception, public Stringable {
+ class DBException : public exception {
public:
virtual const char* what() const throw() = 0;
virtual string toString() const {
return what();
}
+ operator string() const { return toString(); }
};
class AssertionException : public DBException {