@woosh/meep-engine 2.110.0 → 2.110.1

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.
@@ -84121,6 +84121,8 @@ class ConcurrentExecutor {
84121
84121
  task.state.set(TaskState.FAILED);
84122
84122
  task.on.failed.send1(reason);
84123
84123
 
84124
+ if (!task.on.failed.hasHandlers()) ;
84125
+
84124
84126
  this.resolveTasks();
84125
84127
 
84126
84128
  this.on.task_completed.send1(task);
@@ -84208,7 +84210,12 @@ class ConcurrentExecutor {
84208
84210
  try {
84209
84211
  executionTime = this.#runTaskForTimeMonitored(task, sliceTimeLeft);
84210
84212
  } catch (e) {
84211
- this.#fail_task(task, e);
84213
+ const error = new Error("Task threw an exception");
84214
+
84215
+ error.cause = e;
84216
+
84217
+ // console.error(`Task threw an exception`, task, e);
84218
+ this.#fail_task(task, error);
84212
84219
  }
84213
84220
 
84214
84221
  this.#cycle_count++;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.110.0",
8
+ "version": "2.110.1",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"ConcurrentExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/executor/ConcurrentExecutor.js"],"names":[],"mappings":";AAgBA;;GAEG;AACH;IAaI;;;;;OAKG;IACH,wBAJW,MAAM,aACN,MAAM,EAwChB;IApCG;;;OAGG;IACH,WAFU,MAAM,CAEU;IAC1B;;;OAGG;IACH,UAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,iBAFU,MAAM,CAES;IAEzB;;;OAGG;IACH,YAFU,MAAM,CAEI;IAEpB;;;;MAIC;IAED,cAAiB;IAEjB;;;OAGG;IACH,QAFU,MAAM,GAAC,gBAAgB,CAES;IAG9C;;;OAGG;IACH,qCAmEC;IAED;;;OAGG;IACH,oCAaC;IAED;;;;OAIG;IACH,wBAFY,OAAO,CAwBlB;IAED;;;OAGG;IACH,sBAGC;IAED;;;OAGG;IACH,eAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,kBAkCC;IAED;;OAEG;IACH,qBA8BC;IAED;;;;OAIG;IACH,sBAFa,OAAO,CAYnB;IA+KD;;;OAGG;IACH,aAQC;IAED,0BAMC;;CACJ;;;;mBAvfkB,+BAA+B;wBA2fxC,MAAM"}
1
+ {"version":3,"file":"ConcurrentExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/executor/ConcurrentExecutor.js"],"names":[],"mappings":";AAgBA;;GAEG;AACH;IAaI;;;;;OAKG;IACH,wBAJW,MAAM,aACN,MAAM,EAwChB;IApCG;;;OAGG;IACH,WAFU,MAAM,CAEU;IAC1B;;;OAGG;IACH,UAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,iBAFU,MAAM,CAES;IAEzB;;;OAGG;IACH,YAFU,MAAM,CAEI;IAEpB;;;;MAIC;IAED,cAAiB;IAEjB;;;OAGG;IACH,QAFU,MAAM,GAAC,gBAAgB,CAES;IAG9C;;;OAGG;IACH,qCAmEC;IAED;;;OAGG;IACH,oCAaC;IAED;;;;OAIG;IACH,wBAFY,OAAO,CAwBlB;IAED;;;OAGG;IACH,sBAGC;IAED;;;OAGG;IACH,eAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,kBAkCC;IAED;;OAEG;IACH,qBA8BC;IAED;;;;OAIG;IACH,sBAFa,OAAO,CAYnB;IAwLD;;;OAGG;IACH,aAQC;IAED,0BAMC;;CACJ;;;;mBAhgBkB,+BAA+B;wBAogBxC,MAAM"}
@@ -370,6 +370,11 @@ class ConcurrentExecutor {
370
370
  task.state.set(TaskState.FAILED);
371
371
  task.on.failed.send1(reason);
372
372
 
373
+ if (!task.on.failed.hasHandlers()) {
374
+ // no one is watching for task failure
375
+ console.warn(`Task '${task.name}' failed.`, reason);
376
+ }
377
+
373
378
  this.resolveTasks();
374
379
 
375
380
  this.on.task_completed.send1(task);
@@ -458,8 +463,12 @@ class ConcurrentExecutor {
458
463
  try {
459
464
  executionTime = this.#runTaskForTimeMonitored(task, sliceTimeLeft);
460
465
  } catch (e) {
461
- console.error(`Task threw an exception`, task, e);
462
- this.#fail_task(task, e);
466
+ const error = new Error("Task threw an exception");
467
+
468
+ error.cause = e;
469
+
470
+ // console.error(`Task threw an exception`, task, e);
471
+ this.#fail_task(task, error);
463
472
  }
464
473
 
465
474
  this.#cycle_count++;