add data/res to error
Merge pull request #25 from fengmk2/error-res

add res to error