parameters: (self, response, expected=None)
return_statement: return data
docstring: Checks the response for known errors
  
          :param response: response bytes
          :param expected: expected response
          :return: data from response
docstring_summary: Checks the response for known errors
docstring_tokens: Checks the response for known errors
function: def check_response(self, response, expected=None):
          """
          Checks the response for known errors
  
          :param response: response bytes
          :param expected: expected response
          :return: data from response
          """
          status, data = self.peel_response(response, expected)
          if not status:
              error_message = self.error_as_string(data[0])
              msg = "JTAGICE3 error response code 0x{:02X}: '{:s}' ".format(data[0], error_message)
              self.logger.error(msg)
              raise Jtagice3ResponseError(error_message, data[0])
  
          return data
function_tokens: def check_response ( self , response , expected = None ) : status , data = self . peel_response ( response , expected ) if not status : error_message = self . error_as_string ( data [ 0 ] ) msg = "JTAGICE3 error response code 0x{:02X}: '{:s}' " . format ( data [ 0 ] , error_message ) self . logger . error ( msg ) raise Jtagice3ResponseError ( error_message , data [ 0 ] ) return data