Skip to content

Commit

Permalink
Throw error if Device name is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
amccaugh committed Jun 20, 2024
1 parent a7ff0ba commit e2c844e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phidl/device_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,9 @@ def __init__(self, *args, **kwargs):
else:
name = "Unnamed"

if name == "":
raise ValueError("[PHIDL] Device was given a blank name")

# Make a new blank device
self.ports = {}
self.info = {}
Expand Down

0 comments on commit e2c844e

Please sign in to comment.