Remove vacuous redeclarations and redefinitions of the errcode()
authorMike Taylor <mike@indexdata.com>
Tue, 12 Nov 2002 22:43:56 +0000 (22:43 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 12 Nov 2002 22:43:56 +0000 (22:43 +0000)
method in the various subclasses of exception.  We can't remove
the errmsg() and addinfo() declarations from the subclasses,
unfortunately, because we have overridden implementations.
Nice one, C++!  What a very idiosyncratic language.

zoom/master-header
zoom/zexcept.cpp

index 0a9fbb3..1424db8 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: master-header,v 1.8 2002-11-04 23:12:18 mike Exp $
+// $Id: master-header,v 1.9 2002-11-12 22:43:56 mike Exp $
 //
 // ZOOM C++ Binding.
 // The ZOOM homepage is at http://zoom.z3950.org/
 //
 // ZOOM C++ Binding.
 // The ZOOM homepage is at http://zoom.z3950.org/
@@ -104,7 +104,6 @@ namespace ZOOM {
   class YAZ_EXPORT systemException: public exception {
   public:
     systemException ();
   class YAZ_EXPORT systemException: public exception {
   public:
     systemException ();
-    int errcode () const;
     const char *errmsg () const;
   };
 
     const char *errmsg () const;
   };
 
@@ -113,7 +112,6 @@ namespace ZOOM {
   public:
 *   ~bib1Exception ();
     bib1Exception (int errcode, const char *addinfo);
   public:
 *   ~bib1Exception ();
     bib1Exception (int errcode, const char *addinfo);
-    int errcode () const;
     const char *errmsg () const;
     const char *addinfo () const;
   };
     const char *errmsg () const;
     const char *addinfo () const;
   };
@@ -127,7 +125,6 @@ namespace ZOOM {
      CCL = 2
     };
     queryException (int qtype, const char *source);
      CCL = 2
     };
     queryException (int qtype, const char *source);
-    int errcode () const;
     const char *errmsg () const;
     const char *addinfo () const;
   };
     const char *errmsg () const;
     const char *addinfo () const;
   };
index a012c5d..cef6297 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /home/cvsroot/yaz++/zoom/zexcept.cpp,v 1.5 2002-10-30 09:13:12 adam Exp $
+// $Header: /home/cvsroot/yaz++/zoom/zexcept.cpp,v 1.6 2002-11-12 22:43:56 mike Exp $
 
 // Z39.50 Exception classes
 
 
 // Z39.50 Exception classes
 
@@ -30,10 +30,6 @@ namespace ZOOM {
        code = errno;
     }
 
        code = errno;
     }
 
-    int systemException::errcode() const {
-       return code;
-    }
-
     const char *systemException::errmsg() const {
        return strerror(code);
     }
     const char *systemException::errmsg() const {
        return strerror(code);
     }
@@ -69,10 +65,6 @@ namespace ZOOM {
        //  or less work -- it just leaks memory.
     }
 
        //  or less work -- it just leaks memory.
     }
 
-    int bib1Exception::errcode() const {
-       return code;
-    }
-
     const char *bib1Exception::errmsg() const {
        return diagbib1_str(code);
     }
     const char *bib1Exception::errmsg() const {
        return diagbib1_str(code);
     }
@@ -93,10 +85,6 @@ namespace ZOOM {
        //delete q; // ### see comment on bib1Exception destructor
     }
 
        //delete q; // ### see comment on bib1Exception destructor
     }
 
-    int queryException::errcode() const {
-       return code;
-    }
-
     const char *queryException::errmsg() const {
        switch (code) {
        case PREFIX: return "bad prefix search";
     const char *queryException::errmsg() const {
        switch (code) {
        case PREFIX: return "bad prefix search";