Delphi / Object Pascal · Exception

EOSError Exception

What does EOSError Exception mean in Delphi / Object Pascal?

Raised by RaiseLastOSError when a Windows API call the application made returns an error code. The exception message includes the OS error number and its associated system message text, linking directly back to the failing Win32 call. It replaces the now-deprecated EWin32Error.

EOSError ExceptionDelphi (VCL) · Delphi (FireMonkey)

Condition

Raised by RaiseLastOSError when a Windows API call the application made returns an error code. The exception message includes the OS error number and its associated system message text, linking directly back to the failing Win32 call. It replaces the now-deprecated EWin32Error.

Fix

Read the embedded OS error number and message first since it usually points straight at the cause - access denied, file in use, invalid handle - and check permissions, file/handle state, and native API call parameters before retrying.

Related exception