Improve return value checking and error handling.

This commit is contained in:
Jon Siwek 2013-09-24 17:38:22 -05:00
parent 4b24cebad9
commit daf5d0d098
14 changed files with 101 additions and 33 deletions

View file

@ -319,7 +319,8 @@ public:
\
if ( has_it ) \
{ \
info->s->Read(&dst, 0, "has_" #dst); \
if ( ! info->s->Read(&dst, 0, "has_" #dst) ) \
return false; \
if ( ! dst ) \
return false; \
} \
@ -339,7 +340,11 @@ public:
\
if ( has_it ) \
{ \
info->s->Read(&dst, 0, "has_" #dst); \
if ( ! info->s->Read(&dst, 0, "has_" #dst) ) \
{ \
delete del; \
return 0; \
} \
if ( ! dst ) \
{ \
delete del; \