add ERRNO only in case of ERROR CODE given
Merge pull request #6 from gsaunier/master

add ERRNO only in case of ERROR CODE given