aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 01:09:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-17 01:09:11 +0000
commit23cf6f01d9dbe8ccb615e092ff6e318178e0c847 (patch)
tree5244a0d455d1b6395168aa6c1bd904976e286d8a
parentbbb3c4e63690a751cc6fb8edd63bb18370a8312e (diff)
downloadpaludis-23cf6f01d9dbe8ccb615e092ff6e318178e0c847.tar.gz
paludis-23cf6f01d9dbe8ccb615e092ff6e318178e0c847.tar.xz
Use InternalError rather than throwing a string for todo items
-rw-r--r--paludis/package_database.cc2
-rw-r--r--paludis/package_dep_atom.cc8
-rw-r--r--paludis/portage_repository.cc6
-rw-r--r--paludis/version_operator.cc2
4 files changed, 9 insertions, 9 deletions
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index acd876b..2dc83c0 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -176,7 +176,7 @@ PackageDatabase::better_repository(const RepositoryName & r1,
return r1;
}
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
}
RepositoryName
diff --git a/paludis/package_dep_atom.cc b/paludis/package_dep_atom.cc
index e5e57a9..abc2d50 100644
--- a/paludis/package_dep_atom.cc
+++ b/paludis/package_dep_atom.cc
@@ -61,7 +61,7 @@ PackageDepAtom::PackageDepAtom(const std::string & s) :
try
{
if (s.empty())
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
if (std::string::npos != std::string("<>=~").find(s.at(0)))
{
@@ -74,10 +74,10 @@ PackageDepAtom::PackageDepAtom(const std::string & s) :
while (true)
{
if (p >= s.length())
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
q = s.find('-', q + 1);
if (++q >= s.length())
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
if (s.at(q) >= '0' && s.at(q) <= '9')
break;
}
@@ -86,7 +86,7 @@ PackageDepAtom::PackageDepAtom(const std::string & s) :
if ('*' == s.at(s.length() - 1))
{
if (_version_operator != vo_equal)
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
_version_operator = vo_equal_star;
_version_spec = CountedPtr<VersionSpec, count_policy::ExternalCountTag>(
new VersionSpec(s.substr(q, s.length() - q - 1)));
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index 2df42ba..f8a7289 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -222,7 +222,7 @@ PortageRepository::need_category_names() const
"profiles/categories").c_str());
if (! cat_file)
- throw "TODO"; /// \bug real exception needed
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug real exception needed
LineConfigFile cats(&cat_file);
@@ -317,7 +317,7 @@ PortageRepository::do_version_metadata(
std::string line;
if (! cache)
- throw "TODO";
+ throw InternalError(__PRETTY_FUNCTION__, "todo");
/// \bug this lot
std::getline(cache, line); result->set(vmk_depend, line);
@@ -360,7 +360,7 @@ PortageRepository::do_query_repository_masks(const CategoryNamePart & c,
std::ifstream f(stringify(_implementation->location / "profiles" / "package.mask").c_str());
if (! f)
- throw "todo"; /// \bug exception
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug exception
LineConfigFile ff(&f);
for (LineConfigFile::Iterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
diff --git a/paludis/version_operator.cc b/paludis/version_operator.cc
index f60dbf3..04193c2 100644
--- a/paludis/version_operator.cc
+++ b/paludis/version_operator.cc
@@ -56,7 +56,7 @@ VersionOperator::_decode(const std::string & v)
}
}
- throw "TODO"; /// \bug
+ throw InternalError(__PRETTY_FUNCTION__, "todo"); /// \bug
}
std::ostream &