Add a few error definitions. Add GetError function to get an error message from the error code. Use the GetError func to get the error message instead of returning the error code.