IProovException.error constructor
Implementation
factory IProovException.error(String error, String title, String? message) {
switch (error) {
case 'capture_already_active':
return CaptureAlreadyActiveException(title);
case 'session_cannot_be_started_twice':
return SessionCannotBeStartedTwiceException(title);
case 'consent_required':
return ConsentRequiredException(title);
case 'network':
return NetworkException(title, message);
case 'camera_permission':
return CameraPermissionException(title);
case 'server':
return ServerException(title, message);
case 'multi_window_unsupported':
return MultiWindowUnsupportedException(title);
case 'camera':
return CameraException(title, message);
case 'unsupported_device':
return UnsupportedDeviceException(title);
case 'invalid_options':
return InvalidOptionsException(title);
case 'user_timeout':
return UserTimeoutException(title);
case 'unsupported_os_version':
return UnsupportedOSVersionException(title, message);
case 'unsupported_sdk_version':
return UnsupportedSDKVersionException(title, message);
}
return UnexpectedErrorException(title, message);
}