| 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 | } |