aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-12 15:44:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-12 15:44:18 +0000
commit62c81b52fff2fe6483933ddd2e1f957626639ce8 (patch)
treec78510233cffd36847c21de321c20bb825faa98f
parentfeddb601cfdaf4273418659ea0336437eb4d6953 (diff)
downloadpaludis-62c81b52fff2fe6483933ddd2e1f957626639ce8.tar.gz
paludis-62c81b52fff2fe6483933ddd2e1f957626639ce8.tar.xz
When throwing an FSError, include the path in the message if at all possible
-rw-r--r--paludis/util/fs_entry.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/paludis/util/fs_entry.cc b/paludis/util/fs_entry.cc
index 7278632..52dd204 100644
--- a/paludis/util/fs_entry.cc
+++ b/paludis/util/fs_entry.cc
@@ -155,7 +155,7 @@ FSEntry::has_permission(const FSUserGroup & user_group, const FSPermission & fs_
_stat();
if (! _exists)
- throw FSError("Filesystem entry does not exist");
+ throw FSError("Filesystem entry '" + _path + "' does not exist");
switch (user_group)
{
@@ -311,7 +311,7 @@ FSEntry::ctime() const
_stat();
if (! _exists)
- throw FSError("Filesystem entry does not exist");
+ throw FSError("Filesystem entry '" + _path + "' does not exist");
return (*_stat_info).st_ctime;
}
@@ -322,7 +322,7 @@ FSEntry::mtime() const
_stat();
if (! _exists)
- throw FSError("Filesystem entry does not exist");
+ throw FSError("Filesystem entry '" + _path + "' does not exist");
return (*_stat_info).st_mtime;
}
@@ -333,10 +333,10 @@ FSEntry::file_size() const
_stat();
if (! _exists)
- throw FSError("Filesystem entry does not exist");
+ throw FSError("Filesystem entry '" + _path + "' does not exist");
if (! is_regular_file())
- throw FSError("file_size called on a non-regular file");
+ throw FSError("file_size called on non-regular file '" + _path + "'");
return _stat_info->st_size;
}