Skip to content

Commit

Permalink
Log schema error
Browse files Browse the repository at this point in the history
  • Loading branch information
appilon committed May 27, 2020
1 parent af281a4 commit 08f0ed5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helper/schema/resource_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ func (d *ResourceData) Set(key string, value interface{}) error {
}

err := d.setWriter.WriteField(strings.Split(key, "."), value)
if err != nil && d.panicOnError {
panic(err)
if err != nil {
if d.panicOnError {
panic(err)
} else {
log.Printf("[ERROR] setting state: %s", err)
}
}
return err
}
Expand Down

0 comments on commit 08f0ed5

Please sign in to comment.