Added error codes
Merge pull request #1 from nsat/sw_err

Added error codes