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}")
def RaiseIfError(response): if response.status != 0: response = client.GetErrorString( nidaqmx_types.GetErrorStringRequest(error_code=response.status)) raise Exception(f"Error: {response.error_string}")