Skip to content

Commit 737893e

Browse files
committed
Update Intercept
1 parent 292040d commit 737893e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

intercept

Submodule intercept updated 80 files

src/connection.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ game_data* createGameDataDBConnection(param_archive* ar) {
6464
return x;
6565
}
6666

67-
bool Connection::throwQueryError(game_state& gs, mariadb::connection_ref connection, size_t errorID, r_string errorMessage, r_string queryString, std::optional<sourcedocpos> sourcePosition) {
67+
bool Connection::throwQueryError(game_state& gs, mariadb::connection_ref connection, size_t errorID, r_string errorMessage, r_string queryString, std::optional<sourcedocpos> sourcePosition) { //#TODO take SourceDocPosRef
6868
if (connection->account()->hasErrorHandler()) {
6969
for (auto& it : connection->account()->getErrorHandlers()) {
7070
auto res = sqf::call(it, { errorMessage, errorID, queryString });
@@ -129,7 +129,7 @@ GameDataDBAsyncResult* Connection::pushAsyncQuery(game_state& gs, mariadb::conne
129129
invoker_lock l;
130130
throwQueryError(gs, con, 2,
131131
r_string("Invalid number of bind values. Expected "sv)+std::to_string(statement->get_bind_count())+" got "sv+std::to_string(boundValuesQuery.size())
132-
, queryString, sourcePos);
132+
, queryString, *sourcePos);
133133
return false;
134134
}
135135
uint32_t idx = 0;
@@ -184,12 +184,12 @@ GameDataDBAsyncResult* Connection::pushAsyncQuery(game_state& gs, mariadb::conne
184184
}
185185
catch (mariadb::exception::connection& x) {
186186
invoker_lock l;
187-
throwQueryError(gs, con, static_cast<size_t>(x.error_id()), static_cast<r_string>(x.what()), queryString, sourcePos);
187+
throwQueryError(gs, con, static_cast<size_t>(x.error_id()), static_cast<r_string>(x.what()), queryString, *sourcePos);
188188
return false;
189189
}
190190
catch (std::out_of_range& x) {
191191
invoker_lock l;
192-
throwQueryError(gs, con, 1337, static_cast<r_string>(x.what()), queryString, sourcePos);
192+
throwQueryError(gs, con, 1337, static_cast<r_string>(x.what()), queryString, *sourcePos);
193193
return false;
194194
}
195195
}, true);

0 commit comments

Comments
 (0)