Delphi / Object Pascal · Exception

Runtime Error 217: Unhandled exception

What does Runtime Error 217: Unhandled exception mean in Delphi / Object Pascal?

An exception was raised and propagated all the way up without being caught by any try-except block in the call chain.

Runtime Error 217: Unhandled exceptionDelphi (VCL) · Delphi (FireMonkey)

Condition

An exception was raised and propagated all the way up without being caught by any try-except block in the call chain.

Fix

Add a try-except at the boundary where the program should recover instead of crashing, most commonly around the main event loop or a background thread's entry point, and log the exception's class and message there rather than letting it disappear silently.

Pending source verification. Not yet checked against official documentation.

Related exception