Improve file open diagnostic messages

This commit is contained in:
Guy Scharf 2020-08-19 10:14:38 -07:00
parent 4e0d8d33fd
commit 134a30624f

View File

@ -66,7 +66,7 @@ bool EDFInfo::Open(const QString & name)
} }
QFile fi(name); QFile fi(name);
if (!fi.open(QFile::ReadOnly)) { if (!fi.open(QFile::ReadOnly)) {
qDebug() << "EDFInfo::Open() Couldn't open file " << name; qDebug() << "EDFInfo::Open() Couldn't open file" << name << "error" << fi.error() << fi.errorString();
return false; return false;
} }
// fileData = new QByteArray(); // fileData = new QByteArray();
@ -291,7 +291,7 @@ EDFHeaderQT * EDFInfo::GetHeader( const QString & name)
{ {
QFile fi(name); QFile fi(name);
if (!fi.open(QFile::ReadOnly)) { if (!fi.open(QFile::ReadOnly)) {
qDebug() << "EDFInfo::Open() Couldn't open file " << name; qDebug() << "EDFInfo::Open() Couldn't open file" << name << "error" << fi.error() << fi.errorString();
// sleep(1); // sleep(1);
return nullptr; return nullptr;
} }