Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 1.hello-world/1.hello-world.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
2 changes: 1 addition & 1 deletion 1.hello-world/11.read-video-requirejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
2 changes: 1 addition & 1 deletion 1.hello-world/12.read-video-es6.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 1.hello-world/2.read-an-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
document.getElementById('p-loading').innerText = ex;
document.getElementById('ipt-file').disabled = true;
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -110,7 +110,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
divResults.scrollTop = divResults.scrollHeight;
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
6 changes: 3 additions & 3 deletions 1.hello-world/3.read-video-angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class VideoDecodeComponent implements OnInit {
await scanner.open();
} catch (ex: any) {
let errMsg;
if (ex?.message.includes('network connection error')) {
if (ex.message?.includes('network connection error')) {
errMsg =
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.';
} else {
Expand Down Expand Up @@ -159,7 +159,7 @@ export class ImgDecodeComponent implements OnInit {
if (!results.length) { alert('No barcode found'); }
} catch (ex: any) {
let errMsg;
if (ex?.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -257,7 +257,7 @@ export class HelloWorldComponent implements OnInit {
await BarcodeScanner.loadWasm();
} catch (ex: any) {
let errMsg;
if (ex?.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class HelloWorldComponent implements OnInit {
await BarcodeScanner.loadWasm();
} catch (ex: any) {
let errMsg;
if (ex?.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ImgDecodeComponent implements OnInit {
if (!results.length) { alert('No barcode found'); }
} catch (ex: any) {
let errMsg;
if (ex?.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class VideoDecodeComponent implements OnInit {
await scanner.open();
} catch (ex: any) {
let errMsg;
if (ex?.message.includes('network connection error')) {
if (ex.message?.includes('network connection error')) {
errMsg =
'Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.';
} else {
Expand Down
6 changes: 3 additions & 3 deletions 1.hello-world/5.read-video-vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default {
await scanner.open();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -310,7 +310,7 @@ export default {
if (!results.length) { alert('No barcode found'); }
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -379,7 +379,7 @@ export default {
await BarcodeReader.loadWasm();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
await BarcodeReader.loadWasm();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
if (!results.length) { alert('No barcode found'); }
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
await scanner.open();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
2 changes: 1 addition & 1 deletion 1.hello-world/9.read-video-electron/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
await scanner.show();
} catch (ex) {
let errMsg;
if (ex?.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 2.ui-tweaking/1.read-video-show-result.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
startBarcodeScanner();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -105,7 +105,7 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
document.getElementById('results').style.visibility = "visible";
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 2.ui-tweaking/2.read-video-no-extra-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1 style="font-size: 1.5em;">Hide UI Controls</h1>
showScanner();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand All @@ -81,7 +81,7 @@ <h1 style="font-size: 1.5em;">Hide UI Controls</h1>
document.getElementById('lib-load').hidden = true;
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 2.ui-tweaking/3.read-video-with-external-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h1 style="font-size: 1.5em;">Customized UI</h1>
await Dynamsoft.DBR.BarcodeReader.loadWasm();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -144,7 +144,7 @@ <h1 style="font-size: 1.5em;">Customized UI</h1>
updateCurrentResolution();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 2.ui-tweaking/4.difference-video-size.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1 style="font-size: 1.5em;">Enlarge the Video Stream</h1>
showScanner();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -109,7 +109,7 @@ <h1 style="font-size: 1.5em;">Enlarge the Video Stream</h1>
document.getElementById('result').hidden = false;
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
2 changes: 1 addition & 1 deletion 2.ui-tweaking/5.read-video-with-custom-default-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h1>Customized Default UI</h1>
renderResolutionSelector();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message || ex;
Expand Down
2 changes: 1 addition & 1 deletion 3.settings/6.dense-barcodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
await scanner.open();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg =
"Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
Expand Down
2 changes: 1 addition & 1 deletion 3.settings/initScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ window.onload = async function () {
startReading();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 4.use-case/1.fill-a-form-with-barcode-reading.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3>Click each input box to fill in!</h3>
await scanner.show();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand All @@ -103,7 +103,7 @@ <h3>Click each input box to fill in!</h3>
await Dynamsoft.DBR.BarcodeScanner.loadWasm();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
4 changes: 2 additions & 2 deletions 4.use-case/2.read-a-drivers-license.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1 id='header'>Read A Driver's License <a href="javascript:void(0)" id='readAga
await Dynamsoft.DBR.BarcodeScanner.loadWasm();
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down Expand Up @@ -158,7 +158,7 @@ <h1 id='header'>Read A Driver's License <a href="javascript:void(0)" id='readAga
}
} catch (ex) {
let errMsg;
if (ex.message.includes("network connection error")) {
if (ex.message?.includes("network connection error")) {
errMsg = "Failed to connect to Dynamsoft License Server: network connection error. Check your Internet connection or contact Dynamsoft Support (support@dynamsoft.com) to acquire an offline license.";
} else {
errMsg = ex.message||ex;
Expand Down
Loading