Skip to content

Commit

Permalink
In case of empty data in a messages keep going instead of total failure
Browse files Browse the repository at this point in the history
  • Loading branch information
laurikoobas committed Oct 22, 2019
1 parent 896e46f commit 1969352
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rosbag/rosbag_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ func (r *RosBag) ParseTopicsToJSON(extraFields string, timeFilter func(int64) bo

size = r.readMessage(messageOffset.offset+size, compiledMessageFormat)
if size == 0 {
err = fmt.Errorf("ReadMessage returned zero read bytes")
log.Error("Error while reading message", zap.Error(err))
return err
err = fmt.Errorf(noSlashTopic)
log.Error("Error while reading message in topic: ", zap.Error(err))
// return err
}
r.ob.WriteByte('}')
r.ob.WriteByte('\n')
Expand Down

0 comments on commit 1969352

Please sign in to comment.