Delphi / Object Pascal · Exception

Runtime Error 200: EDivByZero

What does Runtime Error 200: EDivByZero mean in Delphi / Object Pascal?

The program divided an integer value by zero.

Runtime Error 200: EDivByZeroDelphi (VCL) · Delphi (FireMonkey)

Condition

The program divided an integer value by zero.

Fix

Add an explicit check for a zero divisor before the division, or catch EDivByZero in a try-except block if the operation is expected to fail occasionally on untrusted input.

Pending source verification. Not yet checked against official documentation.

Related exception