From 25c733a0c34e15e5d864bddf949a2dd2c8f1523c Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 4 Mar 2026 17:28:20 +0000 Subject: [PATCH] Apply suggestions from code review of branch check-setting-validation Co-authored-by: Julian Stirling --- src/openflexure_microscope_server/things/camera/simulation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openflexure_microscope_server/things/camera/simulation.py b/src/openflexure_microscope_server/things/camera/simulation.py index c8ad6f26..d75c36e5 100644 --- a/src/openflexure_microscope_server/things/camera/simulation.py +++ b/src/openflexure_microscope_server/things/camera/simulation.py @@ -173,8 +173,7 @@ class SimulatedCamera(BaseCamera): @blob_density.setter def _set_blob_density(self, value: int) -> None: if value < 0: - self.logger.warning("Sample density must be >= 0") - return + raise ValueError("Sample density must be >= 0") self._blob_density = value if self._capture_enabled: self.generate_canvas()