Skip to content

Commit d89a75d

Browse files
fix: raise ValueError if no stop surface is found in SurfaceGroup
1 parent 4d30a0b commit d89a75d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

optiland/surfaces/surface_group.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def stop_index(self):
116116
if surface.is_stop:
117117
return index
118118

119+
raise ValueError('No stop surface found.')
120+
119121
@property
120122
def num_surfaces(self):
121123
"""int: the number of surfaces"""

0 commit comments

Comments
 (0)