From 1daa71c0ec30ed9a6fcb89ce67bd7472fb4bbf84 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 27 Sep 2016 15:34:57 +0200 Subject: [PATCH] Raise exception when encountering unknown bed adhesion This fails explicitly when the bed adhesion is unknown, so that any programmer who adds bed adhesion or changes existing bed adhesion enum values will get notified as quickly as possible that this build volume calculation should be updated as well. Contributes to issue CURA-2407. --- cura/BuildVolume.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 3bde6ef57f..e913ed7c7a 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -507,6 +507,8 @@ class BuildVolume(SceneNode): elif adhesion_type == "raft": border_size = self._getSettingProperty("raft_margin", "value") + else: + raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?") if self._getSettingProperty("xy_offset", "value"): border_size += self._getSettingProperty("xy_offset", "value")