diff options
Diffstat (limited to 'src/unstable/json.cpp')
-rw-r--r-- | src/unstable/json.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index b1414a9..8c766dd 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp | |||
@@ -276,6 +276,8 @@ Bu::Json &Bu::Json::append( bool bValue ) | |||
276 | 276 | ||
277 | Bu::Json &Bu::Json::appendObject() | 277 | Bu::Json &Bu::Json::appendObject() |
278 | { | 278 | { |
279 | if( eType != Array ) | ||
280 | throw Bu::ExceptionBase("Cannot append to non-array Json Types."); | ||
279 | Json *pOb = new Json( Object ); | 281 | Json *pOb = new Json( Object ); |
280 | uDat.pArray->append( pOb ); | 282 | uDat.pArray->append( pOb ); |
281 | return *pOb; | 283 | return *pOb; |