Skip to content

Commit

Permalink
Improve unvisited member warning format
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrox authored and kevingranade committed Dec 30, 2019
1 parent a0d976e commit a34f59a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ void JsonObject::finish()
const std::string &name = p.first;
if( !visited_members.count( name ) && !string_starts_with( name, "//" ) &&
name != "blueprint" ) {
dbg( D_ERROR ) << "Failed to visit member '" << name << "' in JsonObject at "
<< jsin->line_number( start ) << ":\n" << str() << std::endl;
try {
throw_error( string_format( "Failed to visit member %s in JsonObject", name ), name );
} catch( const JsonError &e ) {
debugmsg( "\n%s", e.what() );
}
}
}
}
Expand Down

0 comments on commit a34f59a

Please sign in to comment.