Commit c6377f5 1 parent 5270531 commit c6377f5 Copy full SHA for c6377f5
File tree 10 files changed +20
-0
lines changed
10 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ const AppDefs = require('./app-defs')
32
32
const { LoadConfig, getMongoConnectionOptions } = require ( './load-config' )
33
33
let HintMongoIsConnected = true
34
34
35
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
36
+
35
37
; ( async ( ) => {
36
38
const jsConfig = LoadConfig ( ) // load and parse config file
37
39
Log . levelCurrent = jsConfig . LogLevel
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ const { MongoClient } = require('mongodb')
27
27
const { setInterval } = require ( 'timers' )
28
28
const sys = require ( 'child_process' )
29
29
30
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
31
+
30
32
const WavFilesWin = [
31
33
'c:\\windows\\media\\Windows Default.wav' ,
32
34
'c:\\windows\\media\\Windows Background.wav' ,
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const Redundancy = require('./redundancy')
25
25
const { MongoClient } = require ( 'mongodb' )
26
26
const CustomProcessor = require ( './customized_module' ) . CustomProcessor
27
27
28
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
29
+
28
30
const args = process . argv . slice ( 2 )
29
31
let inst = null
30
32
if ( args . length > 0 ) inst = parseInt ( args [ 0 ] )
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ const AppDefs = require('./app-defs')
24
24
const LoadConfig = require ( './load-config' )
25
25
const { MongoClient, Double } = require ( 'mongodb' )
26
26
27
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
28
+
27
29
const pipeline = [
28
30
{
29
31
$project : { documentKey : false } ,
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ const app = express()
46
46
app . use ( express . json ( ) )
47
47
let soeQueue = new Queue ( ) // queue of SOE events
48
48
49
+ process . on ( 'uncaughtException' , err => console . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
50
+
49
51
app . listen ( HTTP_PORT , IP_BIND , ( ) => {
50
52
console . log ( 'listening on ' + IP_BIND + ':' + HTTP_PORT )
51
53
} )
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ const Redundancy = require('./redundancy')
24
24
const { MongoClient } = require ( 'mongodb' )
25
25
const CustomProcessor = require ( './customized_module' ) . CustomProcessor
26
26
27
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
28
+
27
29
const args = process . argv . slice ( 2 )
28
30
let inst = null
29
31
if ( args . length > 0 ) inst = parseInt ( args [ 0 ] )
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ const Redundancy = require('./redundancy')
24
24
const { MongoClient } = require ( 'mongodb' )
25
25
const CustomProcessor = require ( './customized_module' ) . CustomProcessor
26
26
27
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
28
+
27
29
const args = process . argv . slice ( 2 )
28
30
let inst = null
29
31
if ( args . length > 0 ) inst = parseInt ( args [ 0 ] )
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ const AutoTag = require('./auto-tag')
36
36
const { castSparkplugValue : castSparkplugValue } = require ( './cast' )
37
37
const autoTag = require ( './auto-tag' )
38
38
39
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
40
+
39
41
const SparkplugNS = 'spBv1.0'
40
42
const DevicesList = [ ] // contains either EoN nodes or devices
41
43
const ValuesQueue = new Queue ( ) // queue of values to update acquisition
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ const dbAuth = require('./app/models')
58
58
const { authJwt } = require ( './app/middlewares' )
59
59
const { canSendCommands } = require ( './app/middlewares/authJwt.js' )
60
60
61
+ process . on ( 'uncaughtException' , err => Log . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
62
+
61
63
// Argument NOAUTH disables user authentication
62
64
var args = process . argv . slice ( 2 )
63
65
if ( args . length > 0 ) if ( args [ 0 ] === 'NOAUTH' ) AUTHENTICATION = false
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ const serverUdpSocket = dgram.createSocket({ type: 'udp4' })
41
41
let bindCount = 0
42
42
const grpSep = '~'
43
43
44
+ process . on ( 'uncaughtException' , err => console . log ( 'Uncaught Exception:' + JSON . stringify ( err ) ) )
45
+
44
46
let ListCreatedTags = [ ]
45
47
let ValuesQueue = new Queue ( ) // queue of values to update
46
48
You can’t perform that action at this time.
0 commit comments