From b37bfe3ed0d2f272efc1f88cf3e3020967756b01 Mon Sep 17 00:00:00 2001 From: Martin Konrad Date: Tue, 12 Nov 2019 12:12:47 -0500 Subject: [PATCH] Retire unused epicsExcept.h Due to a syntax error this header has been unusable since 2001 (since 34ea7db15bacb70ed34a556619c30dbecc453ee1), and no one noticed. Let's remove it. --- src/libCom/cppStd/Makefile | 1 - src/libCom/cppStd/epicsExcept.h | 71 --------------------------------- 2 files changed, 72 deletions(-) delete mode 100644 src/libCom/cppStd/epicsExcept.h diff --git a/src/libCom/cppStd/Makefile b/src/libCom/cppStd/Makefile index 989b87eb0..23834e75a 100644 --- a/src/libCom/cppStd/Makefile +++ b/src/libCom/cppStd/Makefile @@ -9,6 +9,5 @@ SRC_DIRS += $(LIBCOM)/cppStd INC += epicsAlgorithm.h -INC += epicsExcept.h INC += epicsMemory.h diff --git a/src/libCom/cppStd/epicsExcept.h b/src/libCom/cppStd/epicsExcept.h deleted file mode 100644 index e68999735..000000000 --- a/src/libCom/cppStd/epicsExcept.h +++ /dev/null @@ -1,71 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// Author: Andrew Johnson & Jeff Hill -// Date: December 2000 - -#ifndef __EPICS_EXCEPT_H__ -#define __EPICS_EXCEPT_H__ - -#define epicsThrowHere(exc) \ - throw locationException(exc, __FILE__, __LINE__) - -class sourceLocation { -public: // Functions - sourceLocation(const char *fileName, int lineNumber); -// sourceLocation(const sourceLocation&); Copy constructable -// sourceLocation& operator=(const sourceLocation&); Assignable - - const char *fileName() const; - int lineNumber() const; - -private: // Hide compiler-generated member functions - sourceLocation(); // default constructor - -private: // Data - const char *file; - int line; -}; - -template -class locationException : public T, public sourceLocation { -public: - locationException(const T& exc, const char *fileName, int lineNumber); -}; - - -/* Example: - * if (status) epicsThrowHere(std::logic_error("operation failed!")); - * try { ... } catch(sourceLocation& where) { ... } - */ - -// END OF DECLARATIONS - -// INLINE FUNCTIONS - -// sourceFileLocation -inline sourceLocation::sourceLocation (const char *fileName, int lineNumber) : - file(fileName), line(lineNumber) {} - -inline const char* sourceLocation::fileName () const { - return this->file; -} - -inline int sourceLocation::lineNumber () const { - return this->line; -} - -// locationException -template -inline locationException::locationException - (const char *fileName, int lineNumber, const E& exc) : - T(exc), sourceLocation(fileName, lineNumber) {} - - -#endif // __EPICS_EXCEPT_H__