Added some exception handling. Marked all the functions throwing
[emufront] / src / utils / unziphelper.cpp
index af489a1..0304e5b 100644 (file)
@@ -33,6 +33,7 @@ UnzipHelper::UnzipHelper(QObject *parent) :
 {
 }
 
+/* Throws EmuFrontException */
 QMap<QString, EmuFrontObject*> UnzipHelper::listContents(const QString filePath, const FilePathObject *fp)
 {
     if (!fp->getSetup()){
@@ -41,7 +42,7 @@ QMap<QString, EmuFrontObject*> UnzipHelper::listContents(const QString filePath,
 
     QFile fl(filePath);
     if (!fl.open(QIODevice::ReadOnly)) {
-        throw new EmuFrontException(tr("Couldn't read file %1.").arg(filePath));
+        throw EmuFrontException(tr("Couldn't read file %1.").arg(filePath));
     }
 
     //Setup *sup = fp->getSetup();