Skip to content

Commit fdf8965

Browse files
committed
ex?.message. ---> ex.message?.
1 parent 60b9883 commit fdf8965

File tree

39 files changed

+53
-53
lines changed

39 files changed

+53
-53
lines changed

hello-world/3.read-video-angular/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class VideoDecodeComponent implements OnInit {
8989
await scanner.open();
9090
} catch (ex: any) {
9191
let errMsg;
92-
if (ex?.message.includes('network connection error')) {
92+
if (ex.message?.includes('network connection error')) {
9393
errMsg =
9494
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
9595
} else {
@@ -159,7 +159,7 @@ export class ImgDecodeComponent implements OnInit {
159159
if (!results.length) { alert('No barcode found'); }
160160
} catch (ex: any) {
161161
let errMsg;
162-
if (ex?.message.includes("network connection error")) {
162+
if (ex.message?.includes("network connection error")) {
163163
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
164164
} else {
165165
errMsg = ex.message||ex;
@@ -257,7 +257,7 @@ export class HelloWorldComponent implements OnInit {
257257
await BarcodeScanner.loadWasm();
258258
} catch (ex: any) {
259259
let errMsg;
260-
if (ex?.message.includes("network connection error")) {
260+
if (ex.message?.includes("network connection error")) {
261261
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
262262
} else {
263263
errMsg = ex.message||ex;

hello-world/3.read-video-angular/src/app/hello-world/hello-world.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class HelloWorldComponent implements OnInit {
1616
await BarcodeScanner.loadWasm();
1717
} catch (ex: any) {
1818
let errMsg;
19-
if (ex?.message.includes("network connection error")) {
19+
if (ex.message?.includes("network connection error")) {
2020
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
2121
} else {
2222
errMsg = ex.message||ex;

hello-world/3.read-video-angular/src/app/img-decode/img-decode.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class ImgDecodeComponent implements OnInit {
2323
if (!results.length) { alert('No barcode found'); }
2424
} catch (ex: any) {
2525
let errMsg;
26-
if (ex?.message.includes("network connection error")) {
26+
if (ex.message?.includes("network connection error")) {
2727
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
2828
} else {
2929
errMsg = ex.message||ex;

hello-world/3.read-video-angular/src/app/video-decode/video-decode.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class VideoDecodeComponent implements OnInit {
2525
await scanner.open();
2626
} catch (ex: any) {
2727
let errMsg;
28-
if (ex?.message.includes('network connection error')) {
28+
if (ex.message?.includes('network connection error')) {
2929
errMsg =
3030
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
3131
} else {

hello-world/9.read-video-electron/action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ document.getElementById('readBarcode').onclick = async () => {
2828
await scanner.show();
2929
} catch (ex) {
3030
let errMsg;
31-
if (ex?.message.includes("network connection error")) {
31+
if (ex.message?.includes("network connection error")) {
3232
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
3333
} else {
3434
errMsg = ex.message||ex;

hello-world/angular/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9');
4646
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
4747
CaptureVisionRouter.preloadModule(['DBR']).catch((ex) => {
4848
let errMsg;
49-
if (ex?.message.includes('network connection error')) {
49+
if (ex.message?.includes('network connection error')) {
5050
errMsg =
5151
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
5252
} else {
@@ -182,7 +182,7 @@ export class VideoCaptureComponent {
182182
};
183183
} catch (ex: any) {
184184
let errMsg;
185-
if (ex?.message.includes('network connection error')) {
185+
if (ex.message?.includes('network connection error')) {
186186
errMsg =
187187
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
188188
} else {
@@ -263,7 +263,7 @@ export class ImageCaptureComponent {
263263
if (!result.items.length) alert('No barcode found');
264264
} catch (ex: any) {
265265
let errMsg;
266-
if (ex?.message.includes('network connection error')) {
266+
if (ex.message?.includes('network connection error')) {
267267
errMsg =
268268
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
269269
} else {

hello-world/angular/src/app/image-capture/image-capture.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class ImageCaptureComponent {
2727
if (!result.items.length) alert('No barcode found');
2828
} catch (ex: any) {
2929
let errMsg;
30-
if (ex?.message.includes('network connection error')) {
30+
if (ex.message?.includes('network connection error')) {
3131
errMsg =
3232
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
3333
} else {

hello-world/angular/src/app/video-capture/video-capture.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class VideoCaptureComponent {
7878
};
7979
} catch (ex: any) {
8080
let errMsg;
81-
if (ex?.message.includes('network connection error')) {
81+
if (ex.message?.includes('network connection error')) {
8282
errMsg =
8383
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
8484
} else {

hello-world/angular/src/cvr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LicenseManager.initLicense(
2424
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
2525
CaptureVisionRouter.preloadModule(['DBR']).catch((ex) => {
2626
let errMsg;
27-
if (ex?.message.includes('network connection error')) {
27+
if (ex.message?.includes('network connection error')) {
2828
errMsg =
2929
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.';
3030
} else {

hello-world/electron/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Dynamsoft.CVR.CaptureVisionRouter.engineResourcePath =
173173
await router.startCapturing("ReadSingleBarcode");
174174
} catch (ex) {
175175
let errMsg;
176-
if (ex?.message.includes("network connection error")) {
176+
if (ex.message?.includes("network connection error")) {
177177
errMsg =
178178
"Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support ([email protected]) to acquire an offline license.";
179179
} else {

0 commit comments

Comments
 (0)