From 1a30fdf4b747de67dee029423dc90c1db3b913c6 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 25 Apr 2020 23:25:53 +0200 Subject: [PATCH] Exceptions must not be strings in Python --- .../distutils_src/klayout/db/pcell_declaration_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pymod/distutils_src/klayout/db/pcell_declaration_helper.py b/src/pymod/distutils_src/klayout/db/pcell_declaration_helper.py index e351a818b..2945acdbb 100644 --- a/src/pymod/distutils_src/klayout/db/pcell_declaration_helper.py +++ b/src/pymod/distutils_src/klayout/db/pcell_declaration_helper.py @@ -104,10 +104,10 @@ class _PCellDeclarationHelper(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 Exception("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 Exception("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