aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-10 14:37:06 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-10 14:37:06 +0100
commitc84fb95a15d9b9b96a2e36509391fe6444cc69a0 (patch)
treec9a133c1628b9684a7ae469ef661a7574d56f0ce /python
parent0087be380e8f5cac800d07bf364b2974fccf17cf (diff)
downloadpaludis-c84fb95a15d9b9b96a2e36509391fe6444cc69a0.tar.gz
paludis-c84fb95a15d9b9b96a2e36509391fe6444cc69a0.tar.xz
Action exceptions work differently.
Aborts are no longer counted as 'failures'.
Diffstat (limited to 'python')
-rw-r--r--python/action.cc25
1 files changed, 7 insertions, 18 deletions
diff --git a/python/action.cc b/python/action.cc
index dd30255c8..c3b425567 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -124,6 +124,7 @@ namespace
)
{
return new FetchActionOptions(make_named_values<FetchActionOptions>(
+ value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(exclude_unmirrorable),
value_for<n::fetch_unneeded>(fetch_unneeded),
value_for<n::ignore_unfetched>(false),
@@ -139,24 +140,12 @@ void expose_action()
/**
* Exceptions
*/
- ExceptionRegister::get_instance()->add_exception<ActionError>
- ("ActionError", "BaseException",
- "Parent class for action errors.");
- ExceptionRegister::get_instance()->add_exception<UnsupportedActionError>
- ("UnsupportedActionError", "ActionError",
- "Thrown if a PackageID is asked to perform an Action that it does not support.");
- ExceptionRegister::get_instance()->add_exception<InstallActionError>
- ("InstallActionError", "ActionError",
- "Thrown if an install fails.");
- ExceptionRegister::get_instance()->add_exception<FetchActionError>
- ("FetchActionError", "ActionError",
- "Thrown if a fetch fails.");
- ExceptionRegister::get_instance()->add_exception<UninstallActionError>
- ("UninstallActionError", "ActionError",
- "Thrown if an uninstall fails.");
- ExceptionRegister::get_instance()->add_exception<ConfigActionError>
- ("ConfigActionError", "ActionError",
- "Thrown if a configure fails.");
+ ExceptionRegister::get_instance()->add_exception<ActionFailedError>
+ ("ActionFailedError", "BaseException",
+ "Thrown if an action fails.");
+ ExceptionRegister::get_instance()->add_exception<ActionAbortedError>
+ ("ActionAbortedError", "BaseException",
+ "Thrown if an action is aborted.");
/**
* InstallActionOptions