aboutsummaryrefslogtreecommitdiff
path: root/src/serializerbinary.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-06 19:43:57 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-06 19:43:57 +0000
commitb7a415ec0e358967fc39c046fb72f29e227e7104 (patch)
tree3197c3b4f57f02d10649b09ef821982cb00a1bb6 /src/serializerbinary.cpp
parent7ef611a2b62c760065705fa8b66b5ff1edbb8eee (diff)
downloadlibbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.gz
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.bz2
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.xz
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.zip
It builds with build again, and even the tests now. woo!
Diffstat (limited to 'src/serializerbinary.cpp')
-rw-r--r--src/serializerbinary.cpp5
1 files changed, 5 insertions, 0 deletions
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 @@
1#include "serializerbinary.h" 1#include "serializerbinary.h"
2#include "serializable.h" 2#include "serializable.h"
3#include "exceptions.h"
3 4
4SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading): 5SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading):
5 Serializer(bLoading), 6 Serializer(bLoading),
@@ -15,10 +16,14 @@ SerializerBinary::SerializerBinary(const char *sFileName, bool bLoading):
15 if (bLoading) 16 if (bLoading)
16 { 17 {
17 fhFile = fopen(sFileName, "rb"); 18 fhFile = fopen(sFileName, "rb");
19 if( fhFile == NULL )
20 throw FileException("Unable to open file: %s", sFileName );
18 } 21 }
19 else 22 else
20 { 23 {
21 fhFile = fopen(sFileName, "wb"); 24 fhFile = fopen(sFileName, "wb");
25 if( fhFile == NULL )
26 throw FileException("Unable to open file: %s", sFileName );
22 } 27 }
23} 28}
24 29