Skip to content

Commit

Permalink
AURORA: Throw on unknown GFF4 field type configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Nov 12, 2016
1 parent 192b4e9 commit fe5151a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/aurora/gff4file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,15 @@ GFF4Struct::Field::Field(uint32 l, uint16 t, uint16 f, uint32 o, bool g) :
// A string is always read by reference. An extra reference flag is superfluous.
if (type == kFieldTypeString)
isReference = false;

if ((isList && (type == kFieldTypeASCIIString)) ||
(isList && (type == kFieldTypeTlkString)))
throw Common::Exception("GFF4: TODO: Field type %d, isList %d, isReference %d",
(int) type, isList, isReference);

if (isList && isReference && (type != kFieldTypeStruct) && (type != kFieldTypeGeneric))
throw Common::Exception("GFF4: TODO: Field type %d, isList %d, isReference %d",
(int) type, isList, isReference);
}

GFF4Struct::Field::~Field() {
Expand Down

0 comments on commit fe5151a

Please sign in to comment.