示例#1
0
 async def raise_if_error(response):
     if response.status:
         response = await client.GetErrorString(
             nidaqmx_types.GetErrorStringRequest(
                 error_code=response.status))
         raise Exception(f"Error: {response.error_string}")
示例#2
0
def RaiseIfError(response):
    if response.status != 0:
        response = client.GetErrorString(
            nidaqmx_types.GetErrorStringRequest(error_code=response.status))
        raise Exception(f"Error: {response.error_string}")