[Fixed] Raise ArithmeticError in Client code

Hi, when I raise an ArithmeticError I get this error message from the Client Code:

NameError: name 'ArithmeticError' is not defined

Raising ValueError works as expected.

Do I have to import something to be able to raise ArithmeticError?

Moved to bug reports.

It looks like ArithmeticError didn’t make its way to the builtins namespace in Skulpt.

Probably because it’s a rarely thrown error in user code.

If you want a work around you can access it like:

ArithmeticError = ZeroDivisionError.__base__
1 Like