public class ZeroDivisionSyntaxError extends SyntaxError:
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)| Modifier and Type | Member | Description |
|---|---|---|
| public | ZeroDivisionSyntaxErrorZeroDivisionSyntaxError(message as String = "Division by zero constant"): |
Creates a new compile-time division-by-zero error. |