Security Scol plugin
Public Member Functions | Protected Attributes | List of all members
OS_Error Class Reference

The operating system reported an error. More...

#include <cryptlib.h>

Inheritance diagram for OS_Error:
Exception

Public Member Functions

 OS_Error (ErrorType errorType, const std::string &s, const std::string &operation, int errorCode)
 Construct an OS_Error.
 
const std::string & GetOperation () const
 Retrieve the operating system API that reported the error.
 
int GetErrorCode () const
 Retrieve the error code returned by the operating system.
 
- Public Member Functions inherited from Exception
 Exception (ErrorType errorType, const std::string &s)
 Construct a new Exception.
 
const char * what () const throw ()
 Retrieves a C-string describing the exception.
 
const std::string & GetWhat () const
 Retrieves a string describing the exception.
 
void SetWhat (const std::string &s)
 Sets the error string for the exception.
 
ErrorType GetErrorType () const
 Retrieves the error type for the exception.
 
void SetErrorType (ErrorType errorType)
 Sets the error type for the exceptions.
 

Protected Attributes

std::string m_operation
 
int m_errorCode
 

Additional Inherited Members

- Public Types inherited from Exception
enum  ErrorType {
  NOT_IMPLEMENTED , INVALID_ARGUMENT , CANNOT_FLUSH , DATA_INTEGRITY_CHECK_FAILED ,
  INVALID_DATA_FORMAT , IO_ERROR , OTHER_ERROR
}
 Error types or categories. More...
 

Detailed Description

The operating system reported an error.

Definition at line 252 of file cryptlib.h.

Constructor & Destructor Documentation

◆ ~OS_Error()

virtual OS_Error::~OS_Error ( )
throw (
)
inlinevirtual

Definition at line 255 of file cryptlib.h.

◆ OS_Error()

OS_Error::OS_Error ( ErrorType  errorType,
const std::string &  s,
const std::string &  operation,
int  errorCode 
)
inline

Construct an OS_Error.

Parameters
errorTypethe error type
sthe message for the exception
operationthe operation for the exception
errorCodethe error code

The member function what() returns s.

Definition at line 263 of file cryptlib.h.

Member Function Documentation

◆ GetErrorCode()

int OS_Error::GetErrorCode ( ) const
inline

Retrieve the error code returned by the operating system.

Definition at line 269 of file cryptlib.h.

◆ GetOperation()

const std::string & OS_Error::GetOperation ( ) const
inline

Retrieve the operating system API that reported the error.

Definition at line 267 of file cryptlib.h.

Member Data Documentation

◆ m_errorCode

int OS_Error::m_errorCode
protected

Definition at line 273 of file cryptlib.h.

◆ m_operation

std::string OS_Error::m_operation
protected

Definition at line 272 of file cryptlib.h.


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