25 cerr <<
"ERROR: File not found: " << file << endl;
31 static QByteArray msg;
32 msg = QString(
"File \"%1\" not found").arg(
m_file).toLocal8Bit();
39 cerr <<
"ERROR: Failed to open file: " 46 static QByteArray msg;
47 msg = QString(
"Failed to open file \"%1\"").arg(
m_file).toLocal8Bit();
52 m_directory(directory)
54 cerr <<
"ERROR: Directory creation failed for directory: " 61 static QByteArray msg;
62 msg = QString(
"Directory creation failed for \"%1\"").arg(m_directory)
70 cerr <<
"ERROR: File read failed for file: " << file << endl;
76 static QByteArray msg;
77 msg = QString(
"File read failed for \"%1\"").arg(
m_file).toLocal8Bit();
85 cerr <<
"ERROR: File " << op <<
" failed for file: " << file << endl;
91 static QByteArray msg;
92 msg = QString(
"File %1 failed for \"%2\"").arg(m_operation).arg(
m_file)
99 size_t available)
throw() :
100 m_directory(directory),
101 m_required(required),
102 m_available(available)
104 cerr <<
"ERROR: Not enough disc space available in " 105 << directory <<
": need " << required
106 <<
", only have " << available << endl;
110 m_directory(directory),
114 cerr <<
"ERROR: Not enough disc space available in " << directory << endl;
120 static QByteArray msg;
121 if (m_required > 0) {
122 msg = QString(
"Not enough space available in \"%1\": need %2, have %3")
123 .arg(m_directory).arg(m_required).arg(m_available).toLocal8Bit();
125 msg = QString(
"Not enough space available in \"%1\"")
126 .arg(m_directory).toLocal8Bit();
134 cerr <<
"ERROR: Allocation failed: " << purpose << endl;
140 static QByteArray msg;
141 msg = QString(
"Allocation failed: %1").arg(m_purpose).toLocal8Bit();
FileNotFound(QString file)
const char * what() const override
const char * what() const override
FileOperationFailed(QString file, QString operation)
FailedToOpenFile(QString file)
DirectoryCreationFailed(QString directory)
const char * what() const override
const char * what() const override
const char * what() const override
const char * what() const override
AllocationFailed(QString purpose)
FileReadFailed(QString file)
const char * what() const override
InsufficientDiscSpace(QString directory, size_t required, size_t available)