From 8b44a3ba134ae2f6fcf2f9878340b2abaf98841f Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 28 Jul 2023 21:26:05 +0200 Subject: [PATCH] Fixing PCellDeclaration helper (correct use of 'raise' --- src/db/db/built-in-pymacros/pcell_declaration_helper.lym | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/db/built-in-pymacros/pcell_declaration_helper.lym b/src/db/db/built-in-pymacros/pcell_declaration_helper.lym index 1df6dcb53..7e0b3f8fe 100644 --- a/src/db/db/built-in-pymacros/pcell_declaration_helper.lym +++ b/src/db/db/built-in-pymacros/pcell_declaration_helper.lym @@ -358,10 +358,10 @@ class _PCellDeclarationHelper(pya.PCellDeclaration): pdecl.unit = unit if not (choices is None): if not isinstance(choices, list) and not isinstance(choices, tuple): - raise "choices value must be an list/tuple of two-element arrays (description, value)" + raise TypeError("choices value must be an list/tuple of two-element arrays (description, value)") for c in choices: if (not isinstance(choices, list) and not isinstance(choices, tuple)) or len(c) != 2: - raise "choices value must be an list/tuple of two-element arrays (description, value)" + raise TypeError("choices value must be an list/tuple of two-element arrays (description, value)") pdecl.add_choice(c[0],c[1]) # return the declaration object for further operations