Add resource ID to errors coming from apply

This commit is contained in:
Radek Simko 2015-07-22 12:50:06 +02:00 committed by Radek Simko
parent 7a60174dd1
commit 8e477b78d8
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ func (n *EvalApply) Eval(ctx EvalContext) (interface{}, error) {
// if we have one, otherwise we just output it.
if err != nil {
if n.Error != nil {
*n.Error = multierror.Append(*n.Error, err)
helpfulErr := fmt.Errorf("%s: %s", n.Info.Id, err.Error())
*n.Error = multierror.Append(*n.Error, helpfulErr)
} else {
return nil, err
}