From d8baefb2c58b5109fcec16b7379f214fec47ca71 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 5 Aug 1999 15:28:21 +0000 Subject: [PATCH] use exeception instead of assert --- src/cxxTemplates/tsBTree.h | 11 +++++++---- src/libCom/cxxTemplates/tsBTree.h | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) 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 (); } }