Skip to content

Commit

Permalink
send each error message only once per session
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Oct 31, 2023
1 parent e6fcdad commit 5b3e362
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions poki-sdk/lib/web/lib_pokisdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var LibPokiSdk = {
_callback: null,
_urlCallback: null,
_urlParameters:null,
_messagesHashTable: {},

_commercialBreakCallback: function() {
{{{ makeDynCall("v", "PokiSdk._callback")}}}();
Expand Down Expand Up @@ -53,6 +54,10 @@ var LibPokiSdk = {

PokiSdkJs_InternalCaptureError: function(formatted_string) {
var js_formatted_string = UTF8ToString(formatted_string);
if (PokiSdk._messagesHashTable[js_formatted_string]) {
return;
}
PokiSdk._messagesHashTable[js_formatted_string] = true;
var final_message = "DEFOLD:" + js_formatted_string;
PokiSDK.captureError(final_message);
},
Expand Down

0 comments on commit 5b3e362

Please sign in to comment.