aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 12:03:17 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 12:03:17 +0000
commite44365a9f3d344acc0248383e2949bc8fdaf9bf1 (patch)
tree122ce513f833bb0e5e58132a85f0f2ee2e7bc908
parent6f0147d96dca9a6dc7f841eddff451dbf0bbac85 (diff)
downloadpaludis-e44365a9f3d344acc0248383e2949bc8fdaf9bf1.tar.gz
paludis-e44365a9f3d344acc0248383e2949bc8fdaf9bf1.tar.xz
fs_error doesn't really deserve its own files
-rw-r--r--paludis/Makefile.am.m42
-rw-r--r--paludis/dir_iterator.hh1
-rw-r--r--paludis/files.m41
-rw-r--r--paludis/fs_entry.cc6
-rw-r--r--paludis/fs_entry.hh16
-rw-r--r--paludis/fs_error.cc28
-rw-r--r--paludis/fs_error.hh46
7 files changed, 23 insertions, 77 deletions
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index dc70ce6..3c6cf49 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -10,6 +10,7 @@ define(`addtest', `define(`testlist', testlist `$1_TEST')dnl
$1_TEST_SOURCES = $1_TEST.cc
$1_TEST_LDADD = $(top_builddir)/test/libtest.a libpaludis.a libpaludistestextras.a
$1_TEST_CPPFLAGS = -DPALUDIS_TEST_CASE=1
+$1_TEST_CXXFLAGS = -I$(top_srcdir) -g
')dnl
define(`addtestscript', `define(`testscriptlist', testscriptlist `$1_TEST_setup.sh $1_TEST_cleanup.sh')')dnl
define(`addhh', `define(`filelist', filelist `$1.hh')')dnl
@@ -37,6 +38,7 @@ SUBDIRS = . args
libpaludis_a_SOURCES = filelist
libpaludistestextras_a_CPPFLAGS = -DPALUDIS_TEST_CASE=1
+libpaludistestextras_a_CXXFLAGS = -I$(top_srcdir) -g
libpaludistestextras_a_SOURCES = exception_to_debug_string.hh exception_to_debug_string.cc
TESTS = testlist
diff --git a/paludis/dir_iterator.hh b/paludis/dir_iterator.hh
index 024519b..826e091 100644
--- a/paludis/dir_iterator.hh
+++ b/paludis/dir_iterator.hh
@@ -21,7 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_DIR_ITERATOR_HH 1
#include <paludis/fs_entry.hh>
-#include <paludis/fs_error.hh>
#include <paludis/counted_ptr.hh>
#include <iterator>
#include <set>
diff --git a/paludis/files.m4 b/paludis/files.m4
index 7774afb..547f422 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -41,7 +41,6 @@ add(`exception', `hh', `cc')
add(`fake_repository', `hh', `cc')
add(`filter_insert_iterator', `hh', `cc', `test')
add(`fs_entry', `hh', `cc', `test', `testscript')
-add(`fs_error', `hh', `cc')
add(`getenv', `hh', `cc', `test')
add(`indirect_iterator', `hh', `cc', `test')
add(`instantiation_policy', `hh', `cc', `test')
diff --git a/paludis/fs_entry.cc b/paludis/fs_entry.cc
index 4fbf84a..bbd1f91 100644
--- a/paludis/fs_entry.cc
+++ b/paludis/fs_entry.cc
@@ -18,7 +18,6 @@
*/
#include "fs_entry.hh"
-#include "fs_error.hh"
#include "exception.hh"
#include "stringify.hh"
@@ -37,6 +36,11 @@
using namespace paludis;
+FSError::FSError(const std::string & message) throw () :
+ Exception(message)
+{
+}
+
FSEntry::FSEntry(const std::string & path) :
ComparisonPolicyType(&FSEntry::_path),
_path(path)
diff --git a/paludis/fs_entry.hh b/paludis/fs_entry.hh
index 36d6778..d5f8a46 100644
--- a/paludis/fs_entry.hh
+++ b/paludis/fs_entry.hh
@@ -23,16 +23,32 @@
#include <string>
#include <ostream>
#include <paludis/comparison_policy.hh>
+#include <paludis/exception.hh>
/** \file
* Declarations for paludis::Filesystem.
*
* \ingroup Filesystem
+ * \ingroup Exception
*/
namespace paludis
{
/**
+ * Generic filesystem error class.
+ *
+ * \ingroup Exception
+ */
+ class FSError : public Exception
+ {
+ public:
+ /**
+ * Constructor.
+ */
+ FSError(const std::string & message) throw ();
+ };
+
+ /**
* Represents an entry (which may or may not exist) in the filesystem.
*
* \ingroup Filesystem
diff --git a/paludis/fs_error.cc b/paludis/fs_error.cc
deleted file mode 100644
index 429164a..0000000
--- a/paludis/fs_error.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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 "fs_error.hh"
-
-using namespace paludis;
-
-FSError::FSError(const std::string & message) throw () :
- Exception(message)
-{
-}
-
diff --git a/paludis/fs_error.hh b/paludis/fs_error.hh
deleted file mode 100644
index 445da39..0000000
--- a/paludis/fs_error.hh
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_FS_ERROR_HH
-#define PALUDIS_GUARD_PALUDIS_FS_ERROR_HH 1
-
-#include <paludis/exception.hh>
-
-/** \file
- * Declarations for the FSError exception class.
- */
-
-namespace paludis
-{
- /**
- * Generic filesystem error class.
- *
- * \ingroup Exception
- */
- class FSError : public Exception
- {
- public:
- /**
- * Constructor.
- */
- FSError(const std::string & message) throw ();
- };
-}
-
-#endif