You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
69
-
CoreModule.loadWasm(['DBR']).catch((ex) => {
70
-
let errMsg;
71
-
if (ex.message?.includes('network connection error')) {
72
-
errMsg=
73
-
'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.';
@@ -211,13 +206,7 @@ export class VideoCaptureComponent {
211
206
router,
212
207
};
213
208
} catch (ex:any) {
214
-
let errMsg;
215
-
if (ex.message?.includes('network connection error')) {
216
-
errMsg=
217
-
'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.';
218
-
} else {
219
-
errMsg=ex.message||ex;
220
-
}
209
+
let errMsg =ex.message||ex;
221
210
console.error(errMsg);
222
211
alert(errMsg);
223
212
throwex;
@@ -267,6 +256,7 @@ export class VideoCaptureComponent {
import'../../cvr'; // import side effects. The license, engineResourcePath, so on.
270
260
271
261
@Component({
272
262
selector: 'app-image-capture',
@@ -292,13 +282,7 @@ export class ImageCaptureComponent {
292
282
if (texts!='') alert(texts);
293
283
if (!result.items.length) alert('No barcode found');
294
284
} catch (ex:any) {
295
-
let errMsg;
296
-
if (ex.message?.includes('network connection error')) {
297
-
errMsg=
298
-
'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.';
if (ex.message?.includes("network connection error")) {
186
-
errMsg =
187
-
"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.";
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
67
-
CoreModule.loadWasm(['DBR']).catch((ex) => {
68
-
let errMsg;
69
-
if (ex.message?.includes('network connection error')) {
70
-
errMsg=
71
-
'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.';
if (ex.message?.includes("network connection error")) {
184
-
errMsg=
185
-
"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.";
import"../../cvr"; // import side effects. The license, engineResourcePath, so on.
267
256
import"./ImageCapture.css";
268
257
269
258
function ImageCapture() {
@@ -298,13 +287,9 @@ function ImageCapture() {
298
287
if (texts!=="") alert(texts);
299
288
if (!result.items.length) alert("No barcode found");
300
289
} catch (ex:any) {
301
-
if (ex.message.indexOf("network connection error")) {
302
-
let customMsg =
303
-
"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.";
// Preload "BarcodeReader" module for reading barcodes. It will save time on the initial decoding by skipping the module loading.
71
-
CoreModule.loadWasm(['DBR']).catch((ex) => {
72
-
let errMsg;
73
-
if (ex.message?.includes('network connection error')) {
74
-
errMsg=
75
-
'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.';
if (ex.message?.includes("network connection error")) {
185
-
errMsg =
186
-
"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.";
187
-
} else {
188
-
errMsg = ex.message || ex;
189
-
}
177
+
let errMsg = ex.message || ex;
190
178
console.error(errMsg);
191
179
alert(errMsg);
192
180
throw ex;
@@ -241,6 +229,7 @@ onBeforeUnmount(async () => {
241
229
import { onMounted, onBeforeUnmount, ref, type Ref } from "vue";
242
230
import { type BarcodeResultItem } from "@dynamsoft/dynamsoft-barcode-reader";
243
231
import { CaptureVisionRouter } from "dynamsoft-capture-vision-router";
232
+
import "../cvr"; // import side effects. The license, engineResourcePath, so on.
if (!result.items.length) alert("No barcode found");
262
251
} catch (ex: any) {
263
252
let errMsg = ex.message || ex;
264
-
if (errMsg.includes("network connection error")) {
265
-
errMsg =
266
-
"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.";
constmessage=`The page is opened via file:// and our SDKs may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
35
-
console.warn(message);
36
-
alert(message);
34
+
constmessage=`The page is opened via file:// and our SDKs may not work properly. Please open the page via https:// or host it on "http://localhost/".`;
if (ex.message?.includes("network connection error")) {
109
-
errMsg =
110
-
"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.";
0 commit comments