MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / ErrorHandler

Class ErrorHandler

Libraries/unrar/errhnd.hpp:21–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19};
20
21class ErrorHandler
22{
23 private:
24 RAR_EXIT ExitCode;
25 uint ErrCount;
26 bool EnableBreak;
27 bool Silent;
28 bool DisableShutdown; // Shutdown is not suitable after last error.
29 public:
30 ErrorHandler();
31 void Clean();
32 void MemoryError();
33 void OpenError(const wchar *FileName);
34 void CloseError(const wchar *FileName);
35 void ReadError(const wchar *FileName);
36 bool AskRepeatRead(const wchar *FileName);
37 void WriteError(const wchar *ArcName,const wchar *FileName);
38 void WriteErrorFAT(const wchar *FileName);
39 bool AskRepeatWrite(const wchar *FileName,bool DiskFull);
40 void SeekError(const wchar *FileName);
41 void GeneralErrMsg(const wchar *fmt,...);
42 void MemoryErrorMsg();
43 void OpenErrorMsg(const wchar *FileName);
44 void OpenErrorMsg(const wchar *ArcName,const wchar *FileName);
45 void CreateErrorMsg(const wchar *FileName);
46 void CreateErrorMsg(const wchar *ArcName,const wchar *FileName);
47 void ReadErrorMsg(const wchar *FileName);
48 void ReadErrorMsg(const wchar *ArcName,const wchar *FileName);
49 void WriteErrorMsg(const wchar *ArcName,const wchar *FileName);
50 void ArcBrokenMsg(const wchar *ArcName);
51 void ChecksumFailedMsg(const wchar *ArcName,const wchar *FileName);
52 void UnknownMethodMsg(const wchar *ArcName,const wchar *FileName);
53 void Exit(RAR_EXIT ExitCode);
54 void SetErrorCode(RAR_EXIT Code);
55 RAR_EXIT GetErrorCode() {return ExitCode;}
56 uint GetErrorCount() {return ErrCount;}
57 void SetSignalHandlers(bool Enable);
58 void Throw(RAR_EXIT Code);
59 void SetSilent(bool Mode) {Silent=Mode;}
60 bool GetSysErrMsg(wchar *Msg,size_t Size);
61 void SysErrMsg();
62 int GetSystemErrorCode();
63 void SetSystemErrorCode(int Code);
64 void SetDisableShutdown() {DisableShutdown=true;}
65 bool IsShutdownEnabled() {return !DisableShutdown;}
66
67 bool UserBreak; // Ctrl+Break is pressed.
68 bool MainExit; // main() is completed.
69};
70
71
72#endif

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected