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

Daniel Burrows dburrows at costa.debian.org
Mon Aug 15 20:07:28 UTC 2005


Author: dburrows
Date: Mon Aug 15 20:07:25 2005
New Revision: 3844

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/exceptions.h
Log:
Make the problem resolver exceptions variants of Exception.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Aug 15 20:07:25 2005
@@ -1,5 +1,9 @@
 2005-08-15  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/problemresolver/exceptions.h:
+
+	  Make the problem resolver exceptions variants of Exception.
+
 	* src/generic/Makefile.am, src/generic/exception.h:
 
 	  Move the Exception class to the generic layer.

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/exceptions.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/exceptions.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/exceptions.h	Mon Aug 15 20:07:25 2005
@@ -20,18 +20,28 @@
 #ifndef EXCEPTIONS_H
 #define EXCEPTIONS_H
 
+#include "../exception.h"
+
 /** Generic errors in the problem resolver. */
-class ProblemResolverError {
+class ProblemResolverError : public Exception {
 };
 
 /** An exception indicating that no more solutions are available. */
-class NoMoreSolutions:public ProblemResolverError {
+class NoMoreSolutions : public ProblemResolverError {
+  std::string errmsg()
+  {
+    return "No more solutions to this dependency problem."
+  }
 };
 
 /** An exception indicating that the resolver ran out of time to
  *  find a solution.
  */
 class NoMoreTime:public ProblemResolverError {
+  std::string errmsg()
+  {
+    return "No more time to solve this dependency problem.";
+  }
 };
 
 #endif // EXCEPTIONS_H



More information about the Aptitude-svn-commit mailing list