From b7a415ec0e358967fc39c046fb72f29e227e7104 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 6 Aug 2006 19:43:57 +0000 Subject: It builds with build again, and even the tests now. woo! --- src/exceptions.cpp | 2 +- src/exceptions.h | 1 + src/paramproc.cpp | 9 ++++++++- src/serializerbinary.cpp | 5 +++++ src/test/xmlreadtest/xmlreadtest.cpp | 6 +++--- 5 files changed, 18 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/exceptions.cpp b/src/exceptions.cpp index 441075d..8d30296 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp @@ -2,4 +2,4 @@ #include subExceptionDef( XmlException ) - +subExceptionDef( FileException ) diff --git a/src/exceptions.h b/src/exceptions.h index 1cc891d..3bf2e0b 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -5,5 +5,6 @@ #include subExceptionDecl( XmlException ) +subExceptionDecl( FileException ) #endif diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 90fa9ac..5cb815c 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp @@ -463,7 +463,14 @@ int ParamProc::help( int argc, char *argv[] ) printf(" "); if( (*i)->cChar ) { - printf("-%c, ", (*i)->cChar ); + if( (*i)->sWord.getString() ) + { + printf("-%c, ", (*i)->cChar ); + } + else + { + printf("-%c ", (*i)->cChar ); + } } else { diff --git a/src/serializerbinary.cpp b/src/serializerbinary.cpp index d7143ab..23fb2b1 100644 --- a/src/serializerbinary.cpp +++ b/src/serializerbinary.cpp @@ -1,5 +1,6 @@ #include "serializerbinary.h" #include "serializable.h" +#include "exceptions.h" SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading): Serializer(bLoading), @@ -15,10 +16,14 @@ SerializerBinary::SerializerBinary(const char *sFileName, bool bLoading): if (bLoading) { fhFile = fopen(sFileName, "rb"); + if( fhFile == NULL ) + throw FileException("Unable to open file: %s", sFileName ); } else { fhFile = fopen(sFileName, "wb"); + if( fhFile == NULL ) + throw FileException("Unable to open file: %s", sFileName ); } } diff --git a/src/test/xmlreadtest/xmlreadtest.cpp b/src/test/xmlreadtest/xmlreadtest.cpp index e2d2a0a..98d8a9e 100644 --- a/src/test/xmlreadtest/xmlreadtest.cpp +++ b/src/test/xmlreadtest/xmlreadtest.cpp @@ -1,6 +1,6 @@ -#include "../xmlfilereader.h" -#include "../xmlstringreader.h" -#include "../xmlfilewriter.h" +#include "xmlfilereader.h" +#include "xmlstringreader.h" +#include "xmlfilewriter.h" int main( int argc, char *argv[] ) { -- cgit v1.2.3