edited June 2021 in Ruby Scripting


I read most of the articles about this definition, but I was wondering how I can use this to return an error message like this:
def coerce_parameters_impl(self):
if (self.w>70): #if width input is bigger than 70
#error message should be here
[here it should be "end" or "return"?]

Sorry this is my first experience with Klayout so I'm a little bit confused

I should put this in Python section! not Ruby. I tried to deleted but I couldn't find the option, sorry.


  • @ashkan Just raise an exception, like this

    raise "An error happened"

    But the intention of "coerce_parameters_impl" is to confine values, not to raise exceptions.


Sign In or Register to comment.