CppCommon  1.0.4.1
C++ Common Library
Public Member Functions | Protected Attributes | List of all members
CppCommon::FileSystemException Class Reference

File system exception. More...

#include <exceptions.h>

Inheritance diagram for CppCommon::FileSystemException:
CppCommon::SystemException CppCommon::Exception CppCommon::DLLException

Public Member Functions

const Pathpath () const noexcept
 Get exception path. More...
 
std::string string () const override
 Get string from the current exception. More...
 
FileSystemExceptionAttach (const Path &path)
 Attach the given path to the exception. More...
 
FileSystemExceptionAttach (const Path &src, const Path &dst)
 Attach the given source and destination paths to the exception. More...
 
 SystemException ()
 Create system exception based on the last system error code. More...
 
 SystemException (int error)
 Create system exception based on the given system error code. More...
 
 SystemException (const std::string &message)
 Create system exception based on the given exception message. More...
 
 SystemException (const std::string &message, int error)
 Create system exception based on the given exception message and system error code. More...
 
- Public Member Functions inherited from CppCommon::SystemException
 SystemException ()
 Create system exception based on the last system error code. More...
 
 SystemException (int error)
 Create system exception based on the given system error code. More...
 
 SystemException (const std::string &message)
 Create system exception based on the given exception message. More...
 
 SystemException (const std::string &message, int error)
 Create system exception based on the given exception message and system error code. More...
 
int system_error () const noexcept
 Get system error code. More...
 
const std::string & system_message () const noexcept
 Get system error message. More...
 
- Public Member Functions inherited from CppCommon::Exception
 Exception (const std::string &message="")
 Default class constructor. More...
 
 Exception (const Exception &)=default
 
 Exception (Exception &&)=default
 
virtual ~Exception ()=default
 
Exceptionoperator= (const Exception &)=default
 
Exceptionoperator= (Exception &&)=default
 
const std::string & message () const noexcept
 Get exception message. More...
 
const SourceLocationlocation () const noexcept
 Get exception location. More...
 
const char * what () const noexcept override
 Get string identifying exception. More...
 

Protected Attributes

Path _path
 Filesystem exception path. More...
 
Path _src
 Filesystem exception source path. More...
 
Path _dst
 Filesystem exception destination path. More...
 
- Protected Attributes inherited from CppCommon::SystemException
int _system_error
 System error code. More...
 
std::string _system_message
 System error message. More...
 
- Protected Attributes inherited from CppCommon::Exception
std::string _cache
 Cached exception string. More...
 
std::string _message
 Exception message. More...
 
SourceLocation _location
 Exception location. More...
 

Detailed Description

File system exception.

Definition at line 18 of file exceptions.h.

Member Function Documentation

◆ Attach() [1/2]

FileSystemException& CppCommon::FileSystemException::Attach ( const Path path)
inline

Attach the given path to the exception.

Parameters
path- Exception path

Definition at line 33 of file exceptions.h.

◆ Attach() [2/2]

FileSystemException& CppCommon::FileSystemException::Attach ( const Path src,
const Path dst 
)
inline

Attach the given source and destination paths to the exception.

Parameters
src- Exception source path
dst- Exception destination path

Definition at line 40 of file exceptions.h.

◆ path()

const Path& CppCommon::FileSystemException::path ( ) const
inlinenoexcept

Get exception path.

Definition at line 24 of file exceptions.h.

◆ string()

std::string CppCommon::FileSystemException::string ( ) const
overridevirtual

Get string from the current exception.

Reimplemented from CppCommon::SystemException.

Definition at line 13 of file exceptions.cpp.

◆ SystemException() [1/4]

CppCommon::SystemException::SystemException
inline

Create system exception based on the last system error code.

Definition at line 110 of file exceptions.h.

◆ SystemException() [2/4]

CppCommon::SystemException::SystemException
inlineexplicit

Create system exception based on the given exception message.

Parameters
message- Exception message

Definition at line 124 of file exceptions.h.

◆ SystemException() [3/4]

CppCommon::SystemException::SystemException
inlineexplicit

Create system exception based on the given exception message and system error code.

Parameters
message- Exception message
error- System error code

Definition at line 132 of file exceptions.h.

◆ SystemException() [4/4]

CppCommon::SystemException::SystemException
inlineexplicit

Create system exception based on the given system error code.

Parameters
error- System error code

Definition at line 117 of file exceptions.h.

Member Data Documentation

◆ _dst

Path CppCommon::FileSystemException::_dst
protected

Filesystem exception destination path.

Definition at line 49 of file exceptions.h.

◆ _path

Path CppCommon::FileSystemException::_path
protected

Filesystem exception path.

Definition at line 45 of file exceptions.h.

◆ _src

Path CppCommon::FileSystemException::_src
protected

Filesystem exception source path.

Definition at line 47 of file exceptions.h.


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