Skip to content

Commit 454339f

Browse files
committed
Log on exception
1 parent 7008fb7 commit 454339f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/config.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ game_value cmd_reloadConfig(game_state&) {
7575
catch (YAML::BadConversion& x) {
7676
return "error " + x.msg + " in L" + std::to_string(x.mark.line);
7777
}
78+
catch (YAML::ParserException & x) {
79+
return "error " + x.msg + " in L" + std::to_string(x.mark.line);
80+
}
7881
catch (std::runtime_error& x) {
7982
return r_string("error ") + x.what();
8083
}
81-
catch (YAML::ParserException& x) {
82-
return "error " + x.msg + " in L" + std::to_string(x.mark.line);
83-
}
8484
return {};
8585
}
8686

src/connection.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ game_value Connection::cmd_execute(game_state& gs, game_value_parameter con, gam
190190
return true;
191191
}
192192
catch (mariadb::exception::connection& x) {
193-
__debugbreak();
194-
193+
auto exText = r_string("Intercept-DB exception ") + x.what() + "\nat\n" + stmt;
194+
invoker_lock l();
195+
sqf::diag_log(exText);
195196

196197
return false;
197198
}
@@ -235,7 +236,9 @@ game_value Connection::cmd_executeAsync(game_state&, game_value_parameter con, g
235236
__itt_task_end(domainConnection);
236237
return true;
237238
} catch (mariadb::exception::connection& x) {
238-
__debugbreak();
239+
auto exText = r_string("Intercept-DB exception ") + x.what() + "\nat\n" + stmt;
240+
invoker_lock l();
241+
sqf::diag_log(exText);
239242

240243
__itt_task_end(domainConnection);
241244
return false;

0 commit comments

Comments
 (0)