@things-factory/integration-base 6.1.90 → 6.1.91

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-base",
3
- "version": "6.1.90",
3
+ "version": "6.1.91",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "@types/cron": "^2.0.1"
48
48
  },
49
- "gitHead": "5179fd723efa21331105f0c941a1e6062c201eb7"
49
+ "gitHead": "2d49434d317126980f37c8bd2a4f9cc777f12277"
50
50
  }
@@ -57,7 +57,14 @@ export class ScenarioEngine {
57
57
  this.unload(domain, instanceName)
58
58
  }
59
59
  })
60
- instance.start()
60
+
61
+ instance.start().catch(err => {
62
+ /* IMPORTANT. if you didn't catch exception here, system will be exit */
63
+ console.error(
64
+ `An exception occurred while executing the scenario instance named "${instanceName}" on the domain "${domain.name}"`,
65
+ err
66
+ )
67
+ })
61
68
 
62
69
  scenarioInstances[instanceName] = instance
63
70
 
@@ -381,8 +381,8 @@ export class ScenarioInstance {
381
381
  this.publishState()
382
382
  }
383
383
 
384
- start() {
385
- this.run()
384
+ async start() {
385
+ await this.run()
386
386
  }
387
387
 
388
388
  stop() {