pvStatusToException function
Implementation
pvStatusToException(PvStatus pvStatus, String errorMessage) {
switch (pvStatus) {
case PvStatus.OUT_OF_MEMORY:
throw new PvStatusOutOfMemoryError(errorMessage);
case PvStatus.IO_ERROR:
throw new PvStatusIoError(errorMessage);
case PvStatus.INVALID_ARGUMENT:
throw new PvStatusInvalidArgumentError(errorMessage);
default:
print("Unmapped error code: $pvStatus");
throw new PvError(errorMessage);
}
}