tods-competition-factory 1.6.28 → 1.6.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -332,7 +332,8 @@ var syncGlobalState$1 = {
332
332
  setSubscriptions,
333
333
  setTournamentId,
334
334
  setTournamentRecord,
335
- setTournamentRecords
335
+ setTournamentRecords,
336
+ handleCaughtError
336
337
  };
337
338
  function disableNotifications() {
338
339
  syncGlobalState.disableNotifications = true;
@@ -438,6 +439,26 @@ function callListener({ topic, notices }) {
438
439
  method(notices);
439
440
  }
440
441
  }
442
+ function handleCaughtError({
443
+ engineName,
444
+ methodName,
445
+ params,
446
+ err
447
+ }) {
448
+ let error;
449
+ if (typeof err === "string") {
450
+ error = err.toUpperCase();
451
+ } else if (err instanceof Error) {
452
+ error = err.message;
453
+ }
454
+ console.log("ERROR", {
455
+ tournamentId: getTournamentId$1(),
456
+ params: JSON.stringify(params),
457
+ engine: engineName,
458
+ methodName,
459
+ error
460
+ });
461
+ }
441
462
 
442
463
  const globalState = {
443
464
  tournamentFactoryVersion: "0.0.0",