use exeception instead of assert

This commit is contained in:
Jeff Hill
1999-08-05 15:28:21 +00:00
parent f326d7c63c
commit d8baefb2c5
2 changed files with 14 additions and 8 deletions

View File

@@ -1,7 +1,4 @@
#ifndef assert // allow use of epicsAssert.h
#include <assert.h>
#endif
//
// tsBTreeRMRet
@@ -32,6 +29,12 @@ class tsBTreeNode
{
friend class tsBTree<T>;
public:
//
// exceptions
//
class invalid_btCmp {};
//
// when someone copies into a class deriving from this
// do _not_ change the node pointers
@@ -96,7 +99,7 @@ private:
}
}
else {
assert(0);
throw invalid_btCmp ();
}
}

View File

@@ -1,7 +1,4 @@
#ifndef assert // allow use of epicsAssert.h
#include <assert.h>
#endif
//
// tsBTreeRMRet
@@ -32,6 +29,12 @@ class tsBTreeNode
{
friend class tsBTree<T>;
public:
//
// exceptions
//
class invalid_btCmp {};
//
// when someone copies into a class deriving from this
// do _not_ change the node pointers
@@ -96,7 +99,7 @@ private:
}
}
else {
assert(0);
throw invalid_btCmp ();
}
}