unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

errhnd.hpp
Go to the documentation of this file.
1#ifndef _RAR_ERRHANDLER_
2#define _RAR_ERRHANDLER_
3
4enum RAR_EXIT // RAR exit code.
5{
19 RARX_USERBREAK = 255
20};
21
22
24{
25 private:
29 bool Silent;
30 bool DisableShutdown; // Shutdown is not suitable after last error.
32 public:
34 void Clean();
35 void MemoryError();
36 void OpenError(const wchar *FileName);
37 void CloseError(const wchar *FileName);
38 void ReadError(const wchar *FileName);
39 void AskRepeatRead(const wchar *FileName,bool &Ignore,bool &Retry,bool &Quit);
40 void WriteError(const wchar *ArcName,const wchar *FileName);
41 void WriteErrorFAT(const wchar *FileName);
42 bool AskRepeatWrite(const wchar *FileName,bool DiskFull);
43 void SeekError(const wchar *FileName);
44 void GeneralErrMsg(const wchar *fmt,...);
45 void MemoryErrorMsg();
46 void OpenErrorMsg(const wchar *FileName);
47 void OpenErrorMsg(const wchar *ArcName,const wchar *FileName);
48 void CreateErrorMsg(const wchar *FileName);
49 void CreateErrorMsg(const wchar *ArcName,const wchar *FileName);
50 void ReadErrorMsg(const wchar *FileName);
51 void ReadErrorMsg(const wchar *ArcName,const wchar *FileName);
52 void WriteErrorMsg(const wchar *ArcName,const wchar *FileName);
53 void ArcBrokenMsg(const wchar *ArcName);
54 void ChecksumFailedMsg(const wchar *ArcName,const wchar *FileName);
55 void UnknownMethodMsg(const wchar *ArcName,const wchar *FileName);
57 void SetErrorCode(RAR_EXIT Code);
60 void SetSignalHandlers(bool Enable);
61 void Throw(RAR_EXIT Code);
62 void SetSilent(bool Mode) {Silent=Mode;}
63 bool GetSysErrMsg(wchar *Msg,size_t Size);
64 void SysErrMsg();
66 void SetSystemErrorCode(int Code);
69
70 bool UserBreak; // Ctrl+Break is pressed.
71 bool MainExit; // main() is completed.
72};
73
74
75#endif
void ReadError(const wchar *FileName)
Definition: errhnd.cpp:54
bool DisableShutdown
Definition: errhnd.hpp:30
void OpenErrorMsg(const wchar *FileName)
Definition: errhnd.cpp:164
void MemoryErrorMsg()
Definition: errhnd.cpp:157
void GeneralErrMsg(const wchar *fmt,...)
Definition: errhnd.cpp:145
void ChecksumFailedMsg(const wchar *ArcName, const wchar *FileName)
Definition: errhnd.cpp:222
bool MainExit
Definition: errhnd.hpp:71
void AskRepeatRead(const wchar *FileName, bool &Ignore, bool &Retry, bool &Quit)
Definition: errhnd.cpp:65
void SetErrorCode(RAR_EXIT Code)
Definition: errhnd.cpp:243
void SysErrMsg()
Definition: errhnd.cpp:368
void ArcBrokenMsg(const wchar *ArcName)
Definition: errhnd.cpp:215
void UnknownMethodMsg(const wchar *ArcName, const wchar *FileName)
Definition: errhnd.cpp:229
void SetSignalHandlers(bool Enable)
Definition: errhnd.cpp:315
bool GetSysErrMsg(wchar *Msg, size_t Size)
Definition: errhnd.cpp:341
ErrorHandler()
Definition: errhnd.cpp:3
bool Silent
Definition: errhnd.hpp:29
uint GetErrorCount()
Definition: errhnd.hpp:59
int GetSystemErrorCode()
Definition: errhnd.cpp:403
void WriteErrorMsg(const wchar *ArcName, const wchar *FileName)
Definition: errhnd.cpp:207
void OpenError(const wchar *FileName)
Definition: errhnd.cpp:29
RAR_EXIT GetErrorCode()
Definition: errhnd.hpp:58
void WriteErrorFAT(const wchar *FileName)
void CreateErrorMsg(const wchar *FileName)
Definition: errhnd.cpp:179
bool ReadErrIgnoreAll
Definition: errhnd.hpp:31
void CloseError(const wchar *FileName)
Definition: errhnd.cpp:38
bool EnableBreak
Definition: errhnd.hpp:28
void SetSilent(bool Mode)
Definition: errhnd.hpp:62
void WriteError(const wchar *ArcName, const wchar *FileName)
Definition: errhnd.cpp:91
void Clean()
Definition: errhnd.cpp:9
void MemoryError()
Definition: errhnd.cpp:22
uint ErrCount
Definition: errhnd.hpp:27
bool AskRepeatWrite(const wchar *FileName, bool DiskFull)
Definition: errhnd.cpp:114
void SeekError(const wchar *FileName)
Definition: errhnd.cpp:132
void ReadErrorMsg(const wchar *FileName)
Definition: errhnd.cpp:193
RAR_EXIT ExitCode
Definition: errhnd.hpp:26
void Exit(RAR_EXIT ExitCode)
Definition: errhnd.cpp:236
void SetDisableShutdown()
Definition: errhnd.hpp:67
bool UserBreak
Definition: errhnd.hpp:70
bool IsShutdownEnabled()
Definition: errhnd.hpp:68
void SetSystemErrorCode(int Code)
Definition: errhnd.cpp:413
void Throw(RAR_EXIT Code)
Definition: errhnd.cpp:327
RAR_EXIT
Definition: errhnd.hpp:5
@ RARX_MEMORY
Definition: errhnd.hpp:14
@ RARX_LOCK
Definition: errhnd.hpp:10
@ RARX_USERBREAK
Definition: errhnd.hpp:19
@ RARX_OPEN
Definition: errhnd.hpp:12
@ RARX_BADPWD
Definition: errhnd.hpp:17
@ RARX_READ
Definition: errhnd.hpp:18
@ RARX_CRC
Definition: errhnd.hpp:9
@ RARX_WRITE
Definition: errhnd.hpp:11
@ RARX_FATAL
Definition: errhnd.hpp:8
@ RARX_CREATE
Definition: errhnd.hpp:15
@ RARX_NOFILES
Definition: errhnd.hpp:16
@ RARX_SUCCESS
Definition: errhnd.hpp:6
@ RARX_USERERROR
Definition: errhnd.hpp:13
@ RARX_WARNING
Definition: errhnd.hpp:7
wchar_t wchar
Definition: rartypes.hpp:13
unsigned int uint
Definition: rartypes.hpp:8