コード例 #1
0
ファイル: composition.go プロジェクト: jyzhe/beehive
func (c *ComposedHandler) callMap(h bh.Handler, msg bh.Msg, ctx bh.MapContext) (
	cells bh.MappedCells, err error) {

	defer func() {
		if r := recover(); r != nil {
			err = errors.New(fmt.Sprintf("%v", r))
		}
	}()

	cells = h.Map(msg, ctx)
	if cells == nil {
		err = fmt.Errorf("%#v drops the msg", h)
	}
	return
}