diff --git a/src/cxxTemplates/tsBTree.h b/src/cxxTemplates/tsBTree.h index 0a9043ad2..333b226e2 100644 --- a/src/cxxTemplates/tsBTree.h +++ b/src/cxxTemplates/tsBTree.h @@ -1,7 +1,4 @@ -#ifndef assert // allow use of epicsAssert.h -#include -#endif // // tsBTreeRMRet @@ -32,6 +29,12 @@ class tsBTreeNode { friend class tsBTree; 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 (); } } diff --git a/src/libCom/cxxTemplates/tsBTree.h b/src/libCom/cxxTemplates/tsBTree.h index 0a9043ad2..333b226e2 100644 --- a/src/libCom/cxxTemplates/tsBTree.h +++ b/src/libCom/cxxTemplates/tsBTree.h @@ -1,7 +1,4 @@ -#ifndef assert // allow use of epicsAssert.h -#include -#endif // // tsBTreeRMRet @@ -32,6 +29,12 @@ class tsBTreeNode { friend class tsBTree; 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 (); } }