Added myexeption to throw errors and show using MyExeption class.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user