1 | import {Promise} from 'bluebird';
|
2 |
|
3 | import 'reflect-metadata';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export function preload() {
|
11 |
|
12 | global.Promise = Promise;
|
13 |
|
14 | Promise.config({
|
15 |
|
16 | warnings: true,
|
17 |
|
18 | longStackTraces: true,
|
19 |
|
20 | cancellation: true,
|
21 |
|
22 | monitoring: true
|
23 | });
|
24 |
|
25 |
|
26 | require('source-map-support').install({
|
27 | handleUncaughtExceptions: false
|
28 | });
|
29 |
|
30 |
|
31 | process.on('uncaughtException', function (err) {
|
32 | console.error('Caught exception: ' + err.stack);
|
33 | });
|
34 |
|
35 |
|
36 | process.on('unhandledRejection', (reason, p) => {
|
37 | console.error('Caught Unhandled Rejection at:' + p + 'reason:' + reason.stack);
|
38 | });
|
39 | } |
\ | No newline at end of file |