From: Mike Taylor Date: Tue, 12 Nov 2002 22:43:56 +0000 (+0000) Subject: Remove vacuous redeclarations and redefinitions of the errcode() X-Git-Tag: YAZPP.0.6~38 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=9e4ee094248d1c5a0fdb5b80ac86c290a36f7056;p=yazpp-moved-to-github.git Remove vacuous redeclarations and redefinitions of the errcode() 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. --- diff --git a/zoom/master-header b/zoom/master-header index 0a9fbb3..1424db8 100644 --- a/zoom/master-header +++ b/zoom/master-header @@ -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/ @@ -104,7 +104,6 @@ namespace ZOOM { class YAZ_EXPORT systemException: public exception { public: systemException (); - int errcode () const; const char *errmsg () const; }; @@ -113,7 +112,6 @@ namespace ZOOM { public: * ~bib1Exception (); bib1Exception (int errcode, const char *addinfo); - int errcode () const; const char *errmsg () const; const char *addinfo () const; }; @@ -127,7 +125,6 @@ namespace ZOOM { CCL = 2 }; queryException (int qtype, const char *source); - int errcode () const; const char *errmsg () const; const char *addinfo () const; }; diff --git a/zoom/zexcept.cpp b/zoom/zexcept.cpp index a012c5d..cef6297 100644 --- a/zoom/zexcept.cpp +++ b/zoom/zexcept.cpp @@ -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 @@ -30,10 +30,6 @@ namespace ZOOM { code = errno; } - int systemException::errcode() const { - return code; - } - const char *systemException::errmsg() const { return strerror(code); } @@ -69,10 +65,6 @@ namespace ZOOM { // or less work -- it just leaks memory. } - int bib1Exception::errcode() const { - return code; - } - const char *bib1Exception::errmsg() const { return diagbib1_str(code); } @@ -93,10 +85,6 @@ namespace ZOOM { //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";