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)  

ErrorHandler Class Reference

#include <errhnd.hpp>

Public Member Functions

 ErrorHandler ()
 
void Clean ()
 
void MemoryError ()
 
void OpenError (const wchar *FileName)
 
void CloseError (const wchar *FileName)
 
void ReadError (const wchar *FileName)
 
void AskRepeatRead (const wchar *FileName, bool &Ignore, bool &Retry, bool &Quit)
 
void WriteError (const wchar *ArcName, const wchar *FileName)
 
void WriteErrorFAT (const wchar *FileName)
 
bool AskRepeatWrite (const wchar *FileName, bool DiskFull)
 
void SeekError (const wchar *FileName)
 
void GeneralErrMsg (const wchar *fmt,...)
 
void MemoryErrorMsg ()
 
void OpenErrorMsg (const wchar *FileName)
 
void OpenErrorMsg (const wchar *ArcName, const wchar *FileName)
 
void CreateErrorMsg (const wchar *FileName)
 
void CreateErrorMsg (const wchar *ArcName, const wchar *FileName)
 
void ReadErrorMsg (const wchar *FileName)
 
void ReadErrorMsg (const wchar *ArcName, const wchar *FileName)
 
void WriteErrorMsg (const wchar *ArcName, const wchar *FileName)
 
void ArcBrokenMsg (const wchar *ArcName)
 
void ChecksumFailedMsg (const wchar *ArcName, const wchar *FileName)
 
void UnknownMethodMsg (const wchar *ArcName, const wchar *FileName)
 
void Exit (RAR_EXIT ExitCode)
 
void SetErrorCode (RAR_EXIT Code)
 
RAR_EXIT GetErrorCode ()
 
uint GetErrorCount ()
 
void SetSignalHandlers (bool Enable)
 
void Throw (RAR_EXIT Code)
 
void SetSilent (bool Mode)
 
bool GetSysErrMsg (wchar *Msg, size_t Size)
 
void SysErrMsg ()
 
int GetSystemErrorCode ()
 
void SetSystemErrorCode (int Code)
 
void SetDisableShutdown ()
 
bool IsShutdownEnabled ()
 

Public Attributes

bool UserBreak
 
bool MainExit
 

Private Attributes

RAR_EXIT ExitCode
 
uint ErrCount
 
bool EnableBreak
 
bool Silent
 
bool DisableShutdown
 
bool ReadErrIgnoreAll
 

Detailed Description

Definition at line 23 of file errhnd.hpp.

Constructor & Destructor Documentation

◆ ErrorHandler()

ErrorHandler::ErrorHandler ( )

Definition at line 3 of file errhnd.cpp.

References Clean().

Member Function Documentation

◆ ArcBrokenMsg()

void ErrorHandler::ArcBrokenMsg ( const wchar ArcName)

Definition at line 215 of file errhnd.cpp.

References RARX_CRC, SetErrorCode(), UIERROR_ARCBROKEN, and uiMsg().

◆ AskRepeatRead()

void ErrorHandler::AskRepeatRead ( const wchar FileName,
bool &  Ignore,
bool &  Retry,
bool &  Quit 
)

◆ AskRepeatWrite()

bool ErrorHandler::AskRepeatWrite ( const wchar FileName,
bool  DiskFull 
)

Definition at line 114 of file errhnd.cpp.

References DisableShutdown, Silent, SysErrMsg(), and uiAskRepeatWrite().

Referenced by File::Write().

◆ ChecksumFailedMsg()

void ErrorHandler::ChecksumFailedMsg ( const wchar ArcName,
const wchar FileName 
)

Definition at line 222 of file errhnd.cpp.

References RARX_CRC, SetErrorCode(), UIERROR_CHECKSUM, and uiMsg().

◆ Clean()

void ErrorHandler::Clean ( )

◆ CloseError()

void ErrorHandler::CloseError ( const wchar FileName)

Definition at line 38 of file errhnd.cpp.

References RARX_FATAL, SetErrorCode(), SysErrMsg(), UIERROR_FILECLOSE, uiMsg(), and UserBreak.

Referenced by File::Close().

◆ CreateErrorMsg() [1/2]

void ErrorHandler::CreateErrorMsg ( const wchar ArcName,
const wchar FileName 
)

Definition at line 185 of file errhnd.cpp.

References RARX_CREATE, SetErrorCode(), SysErrMsg(), UIERROR_FILECREATE, and uiMsg().

◆ CreateErrorMsg() [2/2]

void ErrorHandler::CreateErrorMsg ( const wchar FileName)

◆ Exit()

◆ GeneralErrMsg()

void ErrorHandler::GeneralErrMsg ( const wchar fmt,
  ... 
)

Definition at line 145 of file errhnd.cpp.

References ASIZE, SysErrMsg(), UIERROR_GENERALERRMSG, and uiMsg().

Referenced by Array< T >::Add(), SecHideData(), and ThreadCreate().

◆ GetErrorCode()

RAR_EXIT ErrorHandler::GetErrorCode ( )
inline

Definition at line 58 of file errhnd.hpp.

References ExitCode.

Referenced by CmdExtract::DoExtract(), main(), and RAROpenArchiveEx().

◆ GetErrorCount()

uint ErrorHandler::GetErrorCount ( )
inline

Definition at line 59 of file errhnd.hpp.

References ErrCount.

Referenced by CmdExtract::DoExtract().

◆ GetSysErrMsg()

bool ErrorHandler::GetSysErrMsg ( wchar Msg,
size_t  Size 
)

Definition at line 341 of file errhnd.cpp.

References CharToWide().

Referenced by SysErrMsg().

◆ GetSystemErrorCode()

int ErrorHandler::GetSystemErrorCode ( )

Definition at line 403 of file errhnd.cpp.

Referenced by Log().

◆ IsShutdownEnabled()

bool ErrorHandler::IsShutdownEnabled ( )
inline

Definition at line 68 of file errhnd.hpp.

References DisableShutdown.

Referenced by main().

◆ MemoryError()

void ErrorHandler::MemoryError ( )

Definition at line 22 of file errhnd.cpp.

References Exit(), MemoryErrorMsg(), and RARX_MEMORY.

Referenced by Array< T >::Add(), Unpack::Init(), and SubAllocator::StartSubAllocator().

◆ MemoryErrorMsg()

void ErrorHandler::MemoryErrorMsg ( )

Definition at line 157 of file errhnd.cpp.

References RARX_MEMORY, SetErrorCode(), UIERROR_MEMORY, and uiMsg().

Referenced by main(), and MemoryError().

◆ OpenError()

void ErrorHandler::OpenError ( const wchar FileName)

Definition at line 29 of file errhnd.cpp.

References Exit(), OpenErrorMsg(), and RARX_OPEN.

◆ OpenErrorMsg() [1/2]

void ErrorHandler::OpenErrorMsg ( const wchar ArcName,
const wchar FileName 
)

Definition at line 170 of file errhnd.cpp.

References RARX_OPEN, SetErrorCode(), SysErrMsg(), UIERROR_FILEOPEN, uiMsg(), and Wait().

◆ OpenErrorMsg() [2/2]

void ErrorHandler::OpenErrorMsg ( const wchar FileName)

◆ ReadError()

void ErrorHandler::ReadError ( const wchar FileName)

Definition at line 54 of file errhnd.cpp.

References Exit(), RARX_READ, and ReadErrorMsg().

Referenced by File::Read().

◆ ReadErrorMsg() [1/2]

void ErrorHandler::ReadErrorMsg ( const wchar ArcName,
const wchar FileName 
)

Definition at line 199 of file errhnd.cpp.

References RARX_READ, SetErrorCode(), SysErrMsg(), UIERROR_FILEREAD, and uiMsg().

◆ ReadErrorMsg() [2/2]

void ErrorHandler::ReadErrorMsg ( const wchar FileName)

Definition at line 193 of file errhnd.cpp.

References ReadErrorMsg().

Referenced by ReadError(), and ReadErrorMsg().

◆ SeekError()

void ErrorHandler::SeekError ( const wchar FileName)

Definition at line 132 of file errhnd.cpp.

References Exit(), RARX_FATAL, SysErrMsg(), UIERROR_FILESEEK, uiMsg(), and UserBreak.

Referenced by File::Seek(), and File::Tell().

◆ SetDisableShutdown()

void ErrorHandler::SetDisableShutdown ( )
inline

Definition at line 67 of file errhnd.hpp.

References DisableShutdown.

Referenced by ProcessSignal().

◆ SetErrorCode()

◆ SetSignalHandlers()

void ErrorHandler::SetSignalHandlers ( bool  Enable)

Definition at line 315 of file errhnd.cpp.

References EnableBreak, ProcessSignal(), and TRUE.

Referenced by main().

◆ SetSilent()

void ErrorHandler::SetSilent ( bool  Mode)
inline

Definition at line 62 of file errhnd.hpp.

References Silent.

Referenced by main().

◆ SetSystemErrorCode()

void ErrorHandler::SetSystemErrorCode ( int  Code)

Definition at line 413 of file errhnd.cpp.

Referenced by Log().

◆ SysErrMsg()

◆ Throw()

void ErrorHandler::Throw ( RAR_EXIT  Code)

Definition at line 327 of file errhnd.cpp.

References EnableBreak, mprintf(), MProgAborted, RARX_SUCCESS, RARX_USERBREAK, RARX_USERERROR, SetErrorCode(), and St().

Referenced by Exit().

◆ UnknownMethodMsg()

void ErrorHandler::UnknownMethodMsg ( const wchar ArcName,
const wchar FileName 
)

◆ WriteError()

void ErrorHandler::WriteError ( const wchar ArcName,
const wchar FileName 
)

Definition at line 91 of file errhnd.cpp.

References Exit(), RARX_WRITE, and WriteErrorMsg().

Referenced by CmdExtract::ExtractCurrentFile(), and File::Write().

◆ WriteErrorFAT()

void ErrorHandler::WriteErrorFAT ( const wchar FileName)

Referenced by File::Write().

◆ WriteErrorMsg()

void ErrorHandler::WriteErrorMsg ( const wchar ArcName,
const wchar FileName 
)

Definition at line 207 of file errhnd.cpp.

References RARX_WRITE, SetErrorCode(), SysErrMsg(), UIERROR_FILEWRITE, and uiMsg().

Referenced by WriteError().

Member Data Documentation

◆ DisableShutdown

bool ErrorHandler::DisableShutdown
private

◆ EnableBreak

bool ErrorHandler::EnableBreak
private

Definition at line 28 of file errhnd.hpp.

Referenced by Clean(), SetSignalHandlers(), and Throw().

◆ ErrCount

uint ErrorHandler::ErrCount
private

Definition at line 27 of file errhnd.hpp.

Referenced by Clean(), GetErrorCount(), and SetErrorCode().

◆ ExitCode

RAR_EXIT ErrorHandler::ExitCode
private

Definition at line 26 of file errhnd.hpp.

Referenced by Clean(), Exit(), GetErrorCode(), and SetErrorCode().

◆ MainExit

bool ErrorHandler::MainExit

Definition at line 71 of file errhnd.hpp.

Referenced by Clean(), main(), and ProcessSignal().

◆ ReadErrIgnoreAll

bool ErrorHandler::ReadErrIgnoreAll
private

Definition at line 31 of file errhnd.hpp.

Referenced by AskRepeatRead(), and Clean().

◆ Silent

bool ErrorHandler::Silent
private

Definition at line 29 of file errhnd.hpp.

Referenced by AskRepeatRead(), AskRepeatWrite(), Clean(), and SetSilent().

◆ UserBreak

bool ErrorHandler::UserBreak

Definition at line 70 of file errhnd.hpp.

Referenced by Clean(), CloseError(), ProcessSignal(), SeekError(), and Wait().


The documentation for this class was generated from the following files: