Skip to content

Commit

Permalink
Recover from panics that might be generated by outName.
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Seymour <[email protected]>
  • Loading branch information
jonseymour committed Apr 9, 2016
1 parent dd27fb6 commit 385bf32
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion join.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,15 @@ func (g *group) emitAll() error {
}

// emit a single joined set
func (g *group) emitJoinedSet(set *joinset) error {
func (g *group) emitJoinedSet(set *joinset) (err error) {
defer func() {
if p := recover(); p != nil {
var ok bool
if err, ok = p.(error); !ok {
panic(p)
}
}
}()
if set.name == "" {
set.name = set.First().PointName()
}
Expand Down

0 comments on commit 385bf32

Please sign in to comment.