MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / checkAndOpenFile

Method checkAndOpenFile

src/backup/BackupObject.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void BackupObject::checkAndOpenFile(QFile& file) {
41 if (!file.exists()) {
42 throw openmittsu::exceptions::IllegalArgumentException() << "Could not parse file \"" << file.fileName().toStdString() << "\", it is not readable.";
43 }
44
45 if (!file.open(QIODevice::ReadOnly)) {
46 throw openmittsu::exceptions::IllegalArgumentException() << "Could not parse file \"" << file.fileName().toStdString() << "\", it is not readable.";
47 }
48 }
49
50 }
51}

Callers

nothing calls this directly

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected