IProovException.error constructor
Implementation
factory IProovException.error(String error, String title, String? message) {
switch (error) {
case "capture_already_active":
return CaptureAlreadyActiveException(title);
case "network":
return NetworkException(title, message);
case "camera_permission":
return CameraPermissionException(title);
case "server":
return ServerException(title, message);
case "listener_not_registered":
return ListenerNotRegisteredException(title);
case "multi_window_unsupported":
return MultiWindowUnsupportedException(title);
case "camera":
return CameraException(title, message);
case "face_detector":
return FaceDetectorException(title, message);
case "unsupported_device":
return UnsupportedDeviceException(title);
case "invalid_options":
return InvalidOptionsException(title);
}
return UnexpectedErrorException(title, message);
}