aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/exception.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-06 06:58:37 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-06 06:58:37 +0000
commit394b093d08acab7c9f6cdb8caa83480c9d9af06d (patch)
tree05ffe1c414336e6574d2b62641ca402cee043cbc /paludis/util/exception.cc
parenta92006811222394f20ca317ebb337c2c57b25cfd (diff)
downloadpaludis-394b093d08acab7c9f6cdb8caa83480c9d9af06d.tar.gz
paludis-394b093d08acab7c9f6cdb8caa83480c9d9af06d.tar.xz
Move everything around, and probably break lots of stuff.
Diffstat (limited to 'paludis/util/exception.cc')
-rw-r--r--paludis/util/exception.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/paludis/util/exception.cc b/paludis/util/exception.cc
new file mode 100644
index 0000000..62d2460
--- /dev/null
+++ b/paludis/util/exception.cc
@@ -0,0 +1,58 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/util/exception.hh>
+
+using namespace paludis;
+
+Exception::Exception(const std::string & message) throw () :
+ _message(message)
+{
+}
+
+Exception::~Exception() throw ()
+{
+}
+
+const std::string &
+Exception::message() const throw ()
+{
+ return _message;
+}
+
+InternalError::InternalError(const std::string & where, const std::string & message) throw () :
+ Exception("Eek! Internal error at " + where + ": " + message)
+{
+}
+
+InternalError::InternalError(const std::string & where) throw () :
+ Exception("Eek! Internal error at " + where)
+{
+}
+
+NameError::NameError(const std::string & name, const std::string & role) throw () :
+ Exception("Name '" + name + "' is not a valid " + role)
+{
+}
+
+ConfigurationError::ConfigurationError(const std::string & msg) throw () :
+ Exception(msg)
+{
+}
+