ZeroDivisionSyntaxError
classin packageklyn
public class ZeroDivisionSyntaxError extends SyntaxError:
└ ZeroDivisionSyntaxError

Exception thrown by the compiler when a division by zero is proven at compile time.

This error is distinct from ZeroDivisionError, which is raised at runtime when the divisor cannot be determined statically.

try:
eval("""result = 10 / 0""")
catch error as ZeroDivisionSyntaxError:
print(error.message)
Inherited Properties
propertyInherited Properties from Exception: message
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public ZeroDivisionSyntaxError
ZeroDivisionSyntaxError(message as String = "Division by zero constant"):
Creates a new compile-time division-by-zero error.
Inherited Methods
methodInherited Methods from Exception: toString
methodInherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml