@@ -2846,8 +2846,8 @@ export class AdapterClass extends EventEmitter {
2846
2846
if ( options . obj . type !== 'meta' ) {
2847
2847
try {
2848
2848
this . _utils . validateId ( options . id , false , null ) ;
2849
- } catch ( err ) {
2850
- this . _logger . error ( tools . appendStackTrace ( `${ this . namespaceLog } ${ err . message } ` ) ) ;
2849
+ } catch ( e ) {
2850
+ this . _logger . error ( tools . appendStackTrace ( `${ this . namespaceLog } ${ e . message } ` ) ) ;
2851
2851
return ;
2852
2852
}
2853
2853
}
@@ -3478,8 +3478,8 @@ export class AdapterClass extends EventEmitter {
3478
3478
3479
3479
try {
3480
3480
this . _utils . validateId ( id , true , null ) ;
3481
- } catch ( err ) {
3482
- return tools . maybeCallbackWithError ( callback , err ) ;
3481
+ } catch ( e ) {
3482
+ return tools . maybeCallbackWithError ( callback , e ) ;
3483
3483
}
3484
3484
3485
3485
Validator . assertString ( id , 'id' ) ;
@@ -3725,8 +3725,8 @@ export class AdapterClass extends EventEmitter {
3725
3725
3726
3726
try {
3727
3727
this . _utils . validateId ( id , false , null ) ;
3728
- } catch ( err ) {
3729
- return tools . maybeCallbackWithError ( callback , err ) ;
3728
+ } catch ( e ) {
3729
+ return tools . maybeCallbackWithError ( callback , e ) ;
3730
3730
}
3731
3731
3732
3732
this . #objects. getObject ( this . _utils . fixId ( id ) , options , callback ) ;
@@ -4419,8 +4419,8 @@ export class AdapterClass extends EventEmitter {
4419
4419
4420
4420
try {
4421
4421
this . _utils . validateId ( id , true , null ) ;
4422
- } catch ( err ) {
4423
- return tools . maybeCallbackWithError ( callback , err ) ;
4422
+ } catch ( e ) {
4423
+ return tools . maybeCallbackWithError ( callback , e ) ;
4424
4424
}
4425
4425
4426
4426
this . #objects. findObject ( id , type , options || { } , callback ) ;
@@ -4468,8 +4468,8 @@ export class AdapterClass extends EventEmitter {
4468
4468
4469
4469
try {
4470
4470
this . _utils . validateId ( id , true , options ) ;
4471
- } catch ( err ) {
4472
- return tools . maybeCallbackWithError ( callback , err ) ;
4471
+ } catch ( e ) {
4472
+ return tools . maybeCallbackWithError ( callback , e ) ;
4473
4473
}
4474
4474
4475
4475
return this . _getForeignObject ( { id, options, callback } ) ;
@@ -4605,8 +4605,8 @@ export class AdapterClass extends EventEmitter {
4605
4605
4606
4606
try {
4607
4607
this . _utils . validateId ( id , true , options ) ;
4608
- } catch ( err ) {
4609
- return tools . maybeCallbackWithError ( callback , err ) ;
4608
+ } catch ( e ) {
4609
+ return tools . maybeCallbackWithError ( callback , e ) ;
4610
4610
}
4611
4611
4612
4612
if ( options !== null && options !== undefined ) {
@@ -4653,8 +4653,8 @@ export class AdapterClass extends EventEmitter {
4653
4653
4654
4654
try {
4655
4655
await this . #objects! . delObject ( obj . _id , options ) ;
4656
- } catch ( err ) {
4657
- return tools . maybeCallbackWithError ( callback , err ) ;
4656
+ } catch ( e ) {
4657
+ return tools . maybeCallbackWithError ( callback , e ) ;
4658
4658
}
4659
4659
if ( obj . type === 'state' ) {
4660
4660
try {
@@ -4944,8 +4944,8 @@ export class AdapterClass extends EventEmitter {
4944
4944
4945
4945
try {
4946
4946
this . _utils . validateId ( id , false , null ) ;
4947
- } catch ( err ) {
4948
- return tools . maybeCallbackWithError ( callback , err ) ;
4947
+ } catch ( e ) {
4948
+ return tools . maybeCallbackWithError ( callback , e ) ;
4949
4949
}
4950
4950
4951
4951
return this . _setObjectNotExists ( {
@@ -5064,11 +5064,11 @@ export class AdapterClass extends EventEmitter {
5064
5064
5065
5065
try {
5066
5066
this . _utils . validateId ( id , true , null ) ;
5067
- } catch ( err ) {
5068
- return tools . maybeCallbackWithError ( callback , err ) ;
5067
+ } catch ( e ) {
5068
+ return tools . maybeCallbackWithError ( callback , e ) ;
5069
5069
}
5070
5070
5071
- // check if object exists
5071
+ // check if the object exists
5072
5072
let objExists ;
5073
5073
try {
5074
5074
objExists = await this . #objects. objectExists ( id , options || { } ) ;
@@ -7736,8 +7736,8 @@ export class AdapterClass extends EventEmitter {
7736
7736
7737
7737
try {
7738
7738
this . _utils . validateId ( id , false , null ) ;
7739
- } catch ( err ) {
7740
- return tools . maybeCallbackWithError ( callback , err ) ;
7739
+ } catch ( e ) {
7740
+ return tools . maybeCallbackWithError ( callback , e ) ;
7741
7741
}
7742
7742
7743
7743
const fixedId = this . _utils . fixId ( id , false ) ;
@@ -8364,8 +8364,8 @@ export class AdapterClass extends EventEmitter {
8364
8364
8365
8365
try {
8366
8366
this . _utils . validateId ( id , false , null ) ;
8367
- } catch ( err ) {
8368
- return tools . maybeCallbackWithError ( callback , err ) ;
8367
+ } catch ( e ) {
8368
+ return tools . maybeCallbackWithError ( callback , e ) ;
8369
8369
}
8370
8370
8371
8371
const fixedId = this . _utils . fixId ( id , false ) ;
@@ -8506,8 +8506,8 @@ export class AdapterClass extends EventEmitter {
8506
8506
8507
8507
try {
8508
8508
this . _utils . validateId ( id , true , null ) ;
8509
- } catch ( err ) {
8510
- return tools . maybeCallbackWithError ( callback , err ) ;
8509
+ } catch ( e ) {
8510
+ return tools . maybeCallbackWithError ( callback , e ) ;
8511
8511
}
8512
8512
8513
8513
if ( tools . isObject ( state ) ) {
@@ -8818,8 +8818,8 @@ export class AdapterClass extends EventEmitter {
8818
8818
8819
8819
try {
8820
8820
this . _utils . validateId ( id , true , null ) ;
8821
- } catch ( err ) {
8822
- return tools . maybeCallbackWithError ( callback , err ) ;
8821
+ } catch ( e ) {
8822
+ return tools . maybeCallbackWithError ( callback , e ) ;
8823
8823
}
8824
8824
8825
8825
if ( tools . isObject ( state ) ) {
@@ -9118,7 +9118,7 @@ export class AdapterClass extends EventEmitter {
9118
9118
* - average - Same as max, but take average value.
9119
9119
* - total - Same as max, but calculate total value.
9120
9120
* - count - Same as max, but calculate number of values (nulls will be calculated).
9121
- * - none - No aggregation at all. Only raw values in given period.
9121
+ * - none - No aggregation at all. Only raw values in the given period.
9122
9122
*
9123
9123
* @param id object ID of the state.
9124
9124
* @param options see function description
@@ -9153,9 +9153,9 @@ export class AdapterClass extends EventEmitter {
9153
9153
9154
9154
try {
9155
9155
this . _utils . validateId ( id , true , null ) ;
9156
- } catch ( err ) {
9156
+ } catch ( e ) {
9157
9157
// @ts -expect-error
9158
- return tools . maybeCallbackWithError ( callback , err ) ;
9158
+ return tools . maybeCallbackWithError ( callback , e ) ;
9159
9159
}
9160
9160
9161
9161
options = options || { } ;
@@ -9257,8 +9257,8 @@ export class AdapterClass extends EventEmitter {
9257
9257
9258
9258
try {
9259
9259
this . _utils . validateId ( id , false , null ) ;
9260
- } catch ( err ) {
9261
- return tools . maybeCallbackWithError ( callback , err ) ;
9260
+ } catch ( e ) {
9261
+ return tools . maybeCallbackWithError ( callback , e ) ;
9262
9262
}
9263
9263
9264
9264
// delState does the same as delForeignState, but fixes the ID first
@@ -9311,8 +9311,8 @@ export class AdapterClass extends EventEmitter {
9311
9311
9312
9312
try {
9313
9313
this . _utils . validateId ( id , true , options ) ;
9314
- } catch ( err ) {
9315
- return tools . maybeCallbackWithError ( callback , err ) ;
9314
+ } catch ( e ) {
9315
+ return tools . maybeCallbackWithError ( callback , e ) ;
9316
9316
}
9317
9317
9318
9318
if ( options ?. user && options . user !== SYSTEM_ADMIN_USER ) {
@@ -10293,9 +10293,9 @@ export class AdapterClass extends EventEmitter {
10293
10293
licenses . push ( { ...license , decoded } ) ;
10294
10294
}
10295
10295
}
10296
- } catch ( err ) {
10296
+ } catch ( e ) {
10297
10297
this . _logger . error (
10298
- `${ this . namespaceLog } Cannot decode license "${ license . product } ": ${ err . message } `
10298
+ `${ this . namespaceLog } Cannot decode license "${ license . product } ": ${ e . message } `
10299
10299
) ;
10300
10300
}
10301
10301
}
@@ -10426,8 +10426,8 @@ export class AdapterClass extends EventEmitter {
10426
10426
from : id ,
10427
10427
expire : reportStatusExpirySec
10428
10428
} ) ;
10429
- } catch ( err ) {
10430
- this . _logger . warn ( `${ this . namespaceLog } Could not query used process memory: ${ err . message } ` ) ;
10429
+ } catch ( e ) {
10430
+ this . _logger . warn ( `${ this . namespaceLog } Could not query used process memory: ${ e . message } ` ) ;
10431
10431
}
10432
10432
this . outputCount += 3 ;
10433
10433
if ( this . eventLoopLags . length ) {
@@ -11759,8 +11759,8 @@ export class AdapterClass extends EventEmitter {
11759
11759
updateAliveState : false
11760
11760
} ) ;
11761
11761
setTimeout ( ( ) => this . terminate ( EXIT_CODES . UNCAUGHT_EXCEPTION ) , 1_000 ) ;
11762
- } catch ( err ) {
11763
- this . _logger . error ( `${ this . namespaceLog } exception by stop: ${ err ? err . message : err } ` ) ;
11762
+ } catch ( e ) {
11763
+ this . _logger . error ( `${ this . namespaceLog } exception by stop: ${ e ? e . message : e } ` ) ;
11764
11764
}
11765
11765
}
11766
11766
@@ -12041,8 +12041,8 @@ export class AdapterClass extends EventEmitter {
12041
12041
if ( this . _config . states && this . _config . states . type ) {
12042
12042
try {
12043
12043
this . States = ( await import ( `@iobroker/db-states-${ this . _config . states . type } ` ) ) . Client ;
12044
- } catch ( err ) {
12045
- throw new Error ( `Unknown states type: ${ this . _config . states . type } : ${ err . message } ` ) ;
12044
+ } catch ( e ) {
12045
+ throw new Error ( `Unknown states type: ${ this . _config . states . type } : ${ e . message } ` ) ;
12046
12046
}
12047
12047
} else {
12048
12048
this . States = await getStatesConstructor ( ) ;
@@ -12051,8 +12051,8 @@ export class AdapterClass extends EventEmitter {
12051
12051
if ( this . _config . objects && this . _config . objects . type ) {
12052
12052
try {
12053
12053
this . Objects = ( await import ( `@iobroker/db-objects-${ this . _config . objects . type } ` ) ) . Client ;
12054
- } catch ( err ) {
12055
- throw new Error ( `Unknown objects type: ${ this . _config . objects . type } : ${ err . message } ` ) ;
12054
+ } catch ( e ) {
12055
+ throw new Error ( `Unknown objects type: ${ this . _config . objects . type } : ${ e . message } ` ) ;
12056
12056
}
12057
12057
} else {
12058
12058
this . Objects = await getObjectsConstructor ( ) ;
0 commit comments