Added myexeption to throw errors and show using MyExeption class.

This commit is contained in:
Christian
2019-03-01 11:12:44 +01:00
parent c0c6bf63a0
commit b19c03f524
10 changed files with 76 additions and 32 deletions
+3 -1
View File
@@ -8,6 +8,8 @@
#include "logger.hpp"
#include "myexeption.h"
#include <fstream>
#include <sys/stat.h>
@@ -101,7 +103,7 @@ string Logger::getDirName() {
if (mkdir(dirname.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) {
stringstream ss;
ss<<"Simulation::initLogger: Could not create folder "<<dirname.str()<<" for Logging.";
throw (ss.str());
throw MyException(ss.str());
}
return(dirname.str());
}