[Aptitude-svn-commit] r3843 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Mon Aug 15 20:06:26 UTC 2005


Author: dburrows
Date: Mon Aug 15 20:06:24 2005
New Revision: 3843

Added:
   branches/aptitude-0.3/aptitude/src/generic/exception.h
Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
Log:
Move Exception to the generic layer.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Aug 15 20:06:24 2005
@@ -1,5 +1,9 @@
 2005-08-15  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/Makefile.am, src/generic/exception.h:
+
+	  Move the Exception class to the generic layer.
+
 	* src/generic/problemresolver/problemresolver.h:
 
 	  Fix comparison-by-contents of solutions so that the set of

Added: branches/aptitude-0.3/aptitude/src/generic/exception.h
==============================================================================
--- (empty file)
+++ branches/aptitude-0.3/aptitude/src/generic/exception.h	Mon Aug 15 20:06:24 2005
@@ -0,0 +1,36 @@
+// exception.h                     -*-c++-*-
+//
+//   Copyright (C) 2005 Daniel Burrows
+//
+//   This program is free software; you can redistribute it and/or
+//   modify it under the terms of the GNU General Public License as
+//   published by the Free Software Foundation; either version 2 of
+//   the License, or (at your option) any later version.
+//
+//   This program is distributed in the hope that it will be useful,
+//   but WITHOUT ANY WARRANTY; without even the implied warranty of
+//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//   General Public License for more details.
+//
+//   You should have received a copy of the GNU General Public License
+//   along with this program; see the file COPYING.  If not, write to
+//   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+//   Boston, MA 02111-1307, USA.
+//
+// A generic exception class supporting std::string error messages
+// (unlike std::exception, which only supports const char* error
+// messages).
+
+#ifndef EXCEPTION_H
+#define EXCEPTION_H
+
+#include <string>
+
+class Exception
+{
+public:
+  virtual std::string errmsg()=0;
+  virtual ~Exception() {}
+};
+
+#endif



More information about the Aptitude-svn-commit mailing list