C++ Builder 參考手冊(cè) ? System::Sysutils ? RaiseLastOSError
如果之前調(diào)用操作系統(tǒng) API 返回錯(cuò)誤,調(diào)用這個(gè)函數(shù)拋出 EOSError 異常
頭文件:#include <System.SysUtils.hpp>
命名空間:System::Sysutils
函數(shù)原型:
void __fastcall RaiseLastOSError(void);
void __fastcall RaiseLastOSError(int LastError);
void __fastcall RaiseLastOSError(int LastError, const System::UnicodeString AdditionalInfo);
參數(shù):
- LastError:操作系統(tǒng)返回的錯(cuò)誤編碼,可以通過(guò) GetLastError() 獲??;
- AdditionalInfo:額外的提示信息;
返回值:
- 函數(shù)拋出 EOSError 異常,沒有返回值;
- CheckOSError 內(nèi)部調(diào)用 RaiseLastOSError 拋出 EOSError 異常;
- FMX/VCL 在調(diào)用操作系統(tǒng) API 出錯(cuò)時(shí),調(diào)用這個(gè)函數(shù)拋出 EOSError 異常。
相關(guān):
- System::Sysutils::RaiseLastOSError
- System::Sysutils::RaiseLastWin32Error
- System::Sysutils::CheckOSError
- System::Sysutils::Win32Check
- System::Sysutils::ShowException
- System::Sysutils::ExceptionErrorMessage
- System::Sysutils::OutOfMemoryError
- System::Sysutils::EOutOfMemory
- System::Sysutils::Abort
- System::Sysutils::EAbort
- System::Sysutils
- Vcl::Forms::TApplication::ShowException
C++ Builder 參考手冊(cè) ? System::Sysutils ? RaiseLastOSError