RaiseLastOSError

Raise an exception with the last Operating System error code.

Declaration

Source position: osutilsh.inc line 22

  procedure RaiseLastOSError;  Overload;
  procedure RaiseLastOSError(LastError: Integer);  Overload;

Description

RaiseLastOSError raises an EOSError exception with the error code returned by GetLastOSError. If the Error code is nonzero, then the corresponding error message will be returned. If the error code is zero, a standard message will be returned.

Errors

This procedure may not be implemented on all platforms. If it is not, then a normal Exception will be raised.

See also

Name Description
EOSError Operating system error.
Exception Base class of all exceptions.
GetLastOSError Return the last code from the OS.