CppCommon 1.0.5.0
C++ Common Library
Loading...
Searching...
No Matches
exceptions.h
Go to the documentation of this file.
1
9#ifndef CPPCOMMON_FILESYSTEM_EXCEPTIONS_H
10#define CPPCOMMON_FILESYSTEM_EXCEPTIONS_H
11
12#include "errors/exceptions.h"
13#include "filesystem/path.h"
14
15namespace CppCommon {
16
19{
20public:
22
24 const Path& path() const noexcept { return _path; }
25
27 std::string string() const override;
28
30
34 { _path = path; return *this; }
36
40 FileSystemException& Attach(const Path& src, const Path& dst)
41 { _src = src; _dst = dst; return *this; }
42
43protected:
50};
51
52} // namespace CppCommon
53
54#endif // CPPCOMMON_FILESYSTEM_EXCEPTIONS_H
File system exception.
Definition exceptions.h:19
FileSystemException & Attach(const Path &path)
Attach the given path to the exception.
Definition exceptions.h:33
std::string string() const override
Get string from the current exception.
Path _src
Filesystem exception source path.
Definition exceptions.h:47
FileSystemException & Attach(const Path &src, const Path &dst)
Attach the given source and destination paths to the exception.
Definition exceptions.h:40
const Path & path() const noexcept
Get exception path.
Definition exceptions.h:24
Path _dst
Filesystem exception destination path.
Definition exceptions.h:49
Path _path
Filesystem exception path.
Definition exceptions.h:45
Filesystem path.
Definition path.h:90
System exception.
Definition exceptions.h:107
SystemException()
Create system exception based on the last system error code.
Definition exceptions.h:110
Exceptions definition.
C++ Common project definitions.
Filesystem path definition.