diff options
Diffstat (limited to '')
-rw-r--r-- | src/tafreader.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/tafreader.cpp b/src/tafreader.cpp index 012bb32..ca06daf 100644 --- a/src/tafreader.cpp +++ b/src/tafreader.cpp | |||
@@ -36,20 +36,30 @@ Bu::TafGroup *Bu::TafReader::readGroup() | |||
36 | ws(); | 36 | ws(); |
37 | FString sName = readStr(); | 37 | FString sName = readStr(); |
38 | TafGroup *pGroup = new TafGroup( sName ); | 38 | TafGroup *pGroup = new TafGroup( sName ); |
39 | ws(); | 39 | try |
40 | if( c != ':' ) | 40 | { |
41 | throw TafException("%d:%d: Expected ':' got '%c'.", iLine, iCol, c ); | 41 | ws(); |
42 | next(); | 42 | if( c != ':' ) |
43 | //printf("Node[%s]:\n", sName.getStr() ); | 43 | throw TafException("%d:%d: Expected ':' got '%c'.", |
44 | iLine, iCol, c ); | ||
45 | next(); | ||
46 | //printf("Node[%s]:\n", sName.getStr() ); | ||
44 | 47 | ||
45 | groupContent( pGroup ); | 48 | groupContent( pGroup ); |
46 | 49 | ||
47 | if( c != '}' ) | 50 | if( c != '}' ) |
48 | throw TafException("%d:%d: Expected '}' got '%c'.", iLine, iCol, c ); | 51 | throw TafException("%d:%d: Expected '}' got '%c'.", |
52 | iLine, iCol, c ); | ||
49 | 53 | ||
50 | //next(); | 54 | //next(); |
51 | 55 | ||
52 | return pGroup; | 56 | return pGroup; |
57 | } | ||
58 | catch(...) | ||
59 | { | ||
60 | delete pGroup; | ||
61 | throw; | ||
62 | } | ||
53 | } | 63 | } |
54 | 64 | ||
55 | void Bu::TafReader::groupContent( Bu::TafGroup *pGroup ) | 65 | void Bu::TafReader::groupContent( Bu::TafGroup *pGroup ) |