[Aptitude-devel] r3057 - in branches/aptitude-0.3/aptitude: . src
Daniel Burrows
dburrows@costa.debian.org
Sat, 23 Apr 2005 00:56:24 +0000
Author: dburrows
Date: Sat Apr 23 00:56:21 2005
New Revision: 3057
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Handle exceptional situations in do_next_solution.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Apr 23 00:56:21 2005
@@ -2,6 +2,11 @@
* src/ui.cc:
+ In do_next_solution(), handle exceptional situations from the
+ problem resolver.
+
+ * src/ui.cc:
+
Hook up the various solution-related commands to do *something*,
although some of them are still incomplete.
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Sat Apr 23 00:56:21 2005
@@ -1171,7 +1171,20 @@
static void do_next_solution()
{
if(apt_cache_file && !(*apt_cache_file)->solutions_exhausted())
- (*apt_cache_file)->next_solution();
+ try
+ {
+ (*apt_cache_file)->next_solution();
+ }
+ catch(NoMoreSolutions)
+ {
+ /** \todo this message is bad */
+ show_message(_("All solutions exhausted."));
+ }
+ catch(NoMoreTime)
+ {
+ /** \todo this message is bad */
+ show_message(_("Ran out of time while trying to find a solution."));
+ }
else
beep();
}