diff --git a/.vscode/settings.json b/.vscode/settings.json index 0bd7bcb..a41abac 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "files.associations": { "*.tcc": "cpp", "compare": "cpp", - "type_traits": "cpp" + "type_traits": "cpp", + "iostream": "cpp" } } \ No newline at end of file diff --git a/src/config.cpp b/src/config.cpp index fec1f8c..decabe8 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -4,12 +4,10 @@ config::config(const string _configFilePath, const vector _necessary) { necessary = _necessary; if(!init(_configFilePath)) { - cout << "ERROR init config file" << endl; - exit(1); + throw "[ERROR] Init config file "; } if (!isHaveNecessary()) { - cout << "ERROR Konfiguracijska datoteka nema sva nužna polja!" << endl; - exit(2); + throw "[ERROR] Configuration file does not have all the required fields "; } } @@ -23,7 +21,7 @@ bool config::init(const string _configFilePath) { ifstream configFile; configFile.open(_configFilePath, ios::in); if(!configFile) { - printf ("[CRITICAL ERROR] Nema konfiguracijske datoteke!"); + //printf ("[CRITICAL ERROR] Nema konfiguracijske datoteke!"); return false; }