From 383ad5a674e192830287dfdd53d48507b9aea46e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 25 Jul 2007 07:41:51 +0000 Subject: 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. --- src/file.cpp | 4 ++-- 1 file 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 ) fh = fopen( sName, sFlags ); if( fh == NULL ) { - throw Bu::FileException( errno, strerror(errno) ); + throw Bu::FileException( errno, "%s: %s", strerror(errno), sName ); } } @@ -18,7 +18,7 @@ Bu::File::File( const Bu::FString &sName, const char *sFlags ) fh = fopen( sName.getStr(), sFlags ); if( fh == NULL ) { - throw Bu::FileException( errno, strerror(errno) ); + throw Bu::FileException( errno, "%s: %s", strerror(errno), sName.getStr() ); } } -- cgit v1.2.3