diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-07-25 07:41:51 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-07-25 07:41:51 +0000 |
commit | 383ad5a674e192830287dfdd53d48507b9aea46e (patch) | |
tree | 94b4e67315dc9d9953132cea3a5aaccb96b55873 /src | |
parent | 2fa07d96be7176c2b3d1d255edfea99c49e836e7 (diff) | |
download | libbu++-383ad5a674e192830287dfdd53d48507b9aea46e.tar.gz libbu++-383ad5a674e192830287dfdd53d48507b9aea46e.tar.bz2 libbu++-383ad5a674e192830287dfdd53d48507b9aea46e.tar.xz libbu++-383ad5a674e192830287dfdd53d48507b9aea46e.zip |
I took the cheap way out and added the filename to the exceptions generated by
the file class. This is probably a good idea anyway, but it feels like a silly
fix to another problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/file.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp index 1a8bd08..0e85853 100644 --- a/src/file.cpp +++ b/src/file.cpp | |||
@@ -9,7 +9,7 @@ Bu::File::File( const char *sName, const char *sFlags ) | |||
9 | fh = fopen( sName, sFlags ); | 9 | fh = fopen( sName, sFlags ); |
10 | if( fh == NULL ) | 10 | if( fh == NULL ) |
11 | { | 11 | { |
12 | throw Bu::FileException( errno, strerror(errno) ); | 12 | throw Bu::FileException( errno, "%s: %s", strerror(errno), sName ); |
13 | } | 13 | } |
14 | } | 14 | } |
15 | 15 | ||
@@ -18,7 +18,7 @@ Bu::File::File( const Bu::FString &sName, const char *sFlags ) | |||
18 | fh = fopen( sName.getStr(), sFlags ); | 18 | fh = fopen( sName.getStr(), sFlags ); |
19 | if( fh == NULL ) | 19 | if( fh == NULL ) |
20 | { | 20 | { |
21 | throw Bu::FileException( errno, strerror(errno) ); | 21 | throw Bu::FileException( errno, "%s: %s", strerror(errno), sName.getStr() ); |
22 | } | 22 | } |
23 | } | 23 | } |
24 | 24 | ||