I have this try block in my code:
try
try: do_something_that_might_raise_an_exception() except ValueError as err: errmsg = \'My custom error
This code template should allow you to raise an exception with a custom message.
try: raise ValueError except ValueError as err: raise type(err)("my message")