OnError now returns the error code and added binding for get_error_info_string