![]() |
Audacity 3.2.0
|
Thrown for failure of file or database operations in deeply nested places. More...
#include <FileException.h>
Public Types | |
| enum class | Cause { Open , Read , Write , Rename } |
| Identifies file operation that failed. More... | |
Public Member Functions | |
| FileException (Cause cause_, const wxFileName &fileName_, const TranslatableString &caption=XO("File Error"), const wxFileName &renameTarget_={}) | |
| FileException (const FileException &that) | |
| FileException & | operator= (FileException &&)=delete |
| ~FileException () override | |
Public Member Functions inherited from AudacityException | |
| AudacityException () | |
| virtual | ~AudacityException ()=0 |
| virtual void | DelayedHandlerAction ()=0 |
| Action to do in the main thread at idle time of the event loop. More... | |
Static Public Member Functions | |
| static TranslatableString | WriteFailureMessage (const wxFileName &fileName) |
Static Public Member Functions inherited from AudacityException | |
| static void | EnqueueAction (std::exception_ptr pException, std::function< void(AudacityException *)> delayedHandler) |
Public Attributes | |
| Cause | cause |
| wxFileName | fileName |
| wxFileName | renameTarget |
Protected Member Functions | |
| TranslatableString | ErrorMessage () const override |
| Format an error message appropriate for the Cause. More... | |
| wxString | ErrorHelpUrl () const override |
Protected Member Functions inherited from AudacityException | |
| AudacityException (const AudacityException &)=default | |
| Make this protected to prevent slicing copies. More... | |
| AudacityException (AudacityException &&)=delete | |
| Don't allow moves of this class or subclasses. More... | |
| AudacityException & | operator= (const AudacityException &)=delete |
| Disallow assignment. More... | |
Additional Inherited Members |
Thrown for failure of file or database operations in deeply nested places.
Definition at line 17 of file FileException.h.
|
strong |
Identifies file operation that failed.
| Enumerator | |
|---|---|
| Open | |
| Read | |
| Write | most important to detect when storage space is exhausted |
| Rename | involves two filenames |
Definition at line 22 of file FileException.h.
|
inlineexplicit |
| cause_ | What kind of file operation failed |
| fileName_ | Which file suffered a failure |
| caption | Shown in message box frame, not the main message |
| renameTarget_ | A second file name, only for renaming failure |
Definition at line 29 of file FileException.h.
|
inline |
Definition at line 43 of file FileException.h.
|
override |
Definition at line 15 of file FileException.cpp.
|
overrideprotectedvirtual |
Reimplemented from MessageBoxException.
Definition at line 42 of file FileException.cpp.
|
overrideprotectedvirtual |
Format an error message appropriate for the Cause.
Implements MessageBoxException.
Definition at line 19 of file FileException.cpp.
References FileNames::AbbreviatePath(), cause, fileName, anonymous_namespace{ExportPCM.cpp}::format, Open, Read, Rename, renameTarget, Write, WriteFailureMessage(), and XO().
|
delete |
|
static |
Definition at line 60 of file FileException.cpp.
References FileNames::AbbreviatePath(), fileName, and XO().
Referenced by ProjectFileManager::DoSave(), ErrorMessage(), ProjectFileManager::SaveCopy(), ProjectFileIO::SaveProject(), and ShowDiskFullExportErrorDialog().
| Cause FileException::cause |
Definition at line 62 of file FileException.h.
Referenced by ErrorHelpUrl(), and ErrorMessage().
| wxFileName FileException::fileName |
Definition at line 63 of file FileException.h.
Referenced by ErrorMessage(), and WriteFailureMessage().
| wxFileName FileException::renameTarget |
Definition at line 64 of file FileException.h.
Referenced by ErrorMessage().