System.SysUtils.RaiseLastOSError
Delphi
procedure RaiseLastOSError;
procedure RaiseLastOSError(LastError: Integer);
procedure RaiseLastOSError(LastError: Integer; const AdditionalInfo: string); overload;
C++
extern DELPHI_PACKAGE void __fastcall RaiseLastOSError(void)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Raises an exception for the last occurring OS or system library error.
Call RaiseLastOSError to raise an EOSError exception for the last OS API call that failed. RaiseLastOSError retrieves the code for the last occurring API call error, if any. If this belongs to a previously occurring error, RaiseLastOSError raises an EOSError exception with the error code and message associated with that error.
When specified, the AdditionalInfo parameter is appended to the system-supplied error message to provide additional context information to the user.
See Also
Code Examples