Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #97 from compose/96-transformer-errors
Browse files Browse the repository at this point in the history
throw transformer initialization errors early
  • Loading branch information
nstott committed Jul 20, 2015
2 parents f9a23b9 + fb043bb commit 5fb50d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/adaptor/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ func NewTransformer(pipe *pipe.Pipe, path string, extra Config) (StopStartListen

t.fn = string(ba)

if err = t.initEnvironment(); err != nil {
return t, err
}

return t, nil
}

// Listen starts the transformer's listener, reads each message from the incoming channel
// transformers it into mejson, and then uses the supplied javascript module.exports function
// to transform the document. The document is then emited to this adaptor's children
func (t *Transformer) Listen() (err error) {
if err = t.initEnvironment(); err != nil {
return err
}

return t.pipe.Listen(t.transformOne)
}

Expand Down

0 comments on commit 5fb50d8

Please sign in to comment.