Use error code

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>