aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-16 20:42:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-16 20:42:28 +0000
commit5ed2a019fc5d1ed9e01fa3212f409c1e0a840c04 (patch)
tree394eeb9d6926cd22c3fc9d7e8a2ed6ead9c06dcf
parente537afe2a3a090a78232546e8909d3435b6f05a0 (diff)
downloadpaludis-5ed2a019fc5d1ed9e01fa3212f409c1e0a840c04.tar.gz
paludis-5ed2a019fc5d1ed9e01fa3212f409c1e0a840c04.tar.xz
Add some context to exceptions
-rw-r--r--src/qualudis/qualudis.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qualudis/qualudis.cc b/src/qualudis/qualudis.cc
index fefb7e8..7f8878b 100644
--- a/src/qualudis/qualudis.cc
+++ b/src/qualudis/qualudis.cc
@@ -156,6 +156,8 @@ namespace
{
try
{
+ Context context("When performing check '" + stringify(*i) + "':");
+
qa::CheckResult r((*VC_::get_instance()->find_maker(*i)())(value));
if (r.empty())
@@ -210,6 +212,8 @@ namespace
bool
do_check_package_dir(const FSEntry & dir, const Environment & env)
{
+ Context context("When checking package '" + stringify(dir) + "':");
+
bool ok(true), fatal(false);
cout << "QA checks for package directory " << dir << ":" << endl;
@@ -260,6 +264,8 @@ namespace
bool
do_check_category_dir(const FSEntry & dir, const Environment & env)
{
+ Context context("When checking category '" + stringify(dir) + "':");
+
cout << "QA checks for category directory " << dir << ":" << endl;
cout << endl;
@@ -294,6 +300,8 @@ namespace
bool
do_check_top_level(const FSEntry & dir)
{
+ Context context("When checking top level '" + stringify(dir) + "':");
+
cout << "QA checks for top level directory " << dir << ":" << endl << endl;
qa::QAEnvironment env(dir);
@@ -316,6 +324,8 @@ namespace
bool
do_check(const FSEntry & dir)
{
+ Context context("When checking directory '" + stringify(dir) + "':");
+
if (std::count_if(DirIterator(dir), DirIterator(), IsFileWithExtension(
dir.basename() + "-", ".ebuild")))
{