mpqc::FileOperationFailed Class Reference
Collaboration diagram for mpqc::FileOperationFailed:
Documentation
This is thrown when an operation on a file fails.
Public Types | |
enum | FileOperation { Unknown, Exists, OpenR, OpenW, OpenRW, Close, Read, Write, Corrupt, Chdir, Other } |
Public Member Functions | |
FileOperationFailed (const char *description=0, const char *source_file=0, int line=0, const char *filename=0, FileOperation operation=Unknown, const char *exception_type="FileOperationFailed") noexcept | |
FileOperationFailed (const FileOperationFailed &) noexcept | |
FileOperationFailed (FileOperationFailed &&)=default | |
virtual | ~FileOperationFailed ()=default |
const char * | filename () const noexcept |
FileOperation | operation () const noexcept |
Return the file operation that failed as a FileOperation enum. More... | |
Public Member Functions inherited from mpqc::SystemException | |
SystemException (const char *description=0, const char *file=0, int line=0, const char *exception_type="SystemException") noexcept | |
SystemException (const SystemException &)=default | |
SystemException (SystemException &&)=default | |
virtual | ~SystemException ()=default |
Public Member Functions inherited from mpqc::Exception | |
Exception (const char *description=0, const char *file=0, int line=0, const char *exception_type="Exception") noexcept | |
Exception (const Exception &) noexcept | |
Exception (Exception &&)=default | |
virtual | ~Exception () noexcept |
const char * | what () const noexcept |
overload of Exception::what() More... | |
const char * | exception_type () const noexcept |
Returns the classname of the exception. May return null. More... | |
std::ostream & | elaborate () |
Public Member Functions inherited from mpqc::detail::Exception | |
Exception (const char *description=0, const char *file=0, int line=0) noexcept | |
Exception (const Exception &)=default | |
Exception (Exception &&)=default | |
const char * | description () const noexcept |
const char * | file () const noexcept |
int | line () const noexcept |
Member Enumeration Documentation
◆ FileOperation
Constructor & Destructor Documentation
◆ FileOperationFailed() [1/3]
|
noexcept |
Create a FileOperationFailure exception.
- Parameters
-
description a description of the problem. source_file the file name where the problem occured. line the line number where the exception occured. filename the name of the file for which the operation failed. operation the type of fail operation that resulted in the failure. exception_type the classname of the Exception specialization. The default is "FileOperationFailure".
It is suggested that the special macros FILE and LINE be given as the file
and line
arguments, respectively.
◆ FileOperationFailed() [2/3]
|
noexcept |
◆ FileOperationFailed() [3/3]
|
default |
◆ ~FileOperationFailed()
|
virtualdefault |
Member Function Documentation
◆ filename()
|
inlinenoexcept |
Returns the file name of the file that caused the error, if known. Otherwise 0 is returned.
◆ operation()
|
inlinenoexcept |
Return the file operation that failed as a FileOperation enum.
The documentation for this class was generated from the following files:
- mpqc/util/core/exception.h
- mpqc/util/core/exception.cpp