@orbcharts/core 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/orbcharts-core.es.js +1516 -1516
- package/dist/orbcharts-core.umd.js +5 -5
- package/dist/src/utils/errorMessage.d.ts +1 -4
- package/package.json +1 -1
- package/src/base/createBaseChart.ts +17 -19
- package/src/utils/errorMessage.ts +1 -4
@@ -1,8 +1,5 @@
|
|
1
1
|
export declare function createMessagePrefix(status: 'warning' | 'error'): string;
|
2
|
-
export declare function createOrbChartsErrorMessage(e:
|
3
|
-
message: string;
|
4
|
-
stack: string;
|
5
|
-
}): string;
|
2
|
+
export declare function createOrbChartsErrorMessage(e: Error): string;
|
6
3
|
export declare function createUnexpectedErrorMessage({ from, systemMessage }: {
|
7
4
|
from: string;
|
8
5
|
systemMessage: string;
|
package/package.json
CHANGED
@@ -217,8 +217,7 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
217
217
|
}))
|
218
218
|
}
|
219
219
|
} catch (e) {
|
220
|
-
//
|
221
|
-
// 驗證失敗仍繼續執行,才不會把 Observable 資料流給中斷掉
|
220
|
+
// 不中斷資料流
|
222
221
|
console.error(createOrbChartsErrorMessage(e))
|
223
222
|
}
|
224
223
|
try {
|
@@ -230,10 +229,10 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
230
229
|
}))
|
231
230
|
}
|
232
231
|
}),
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
232
|
+
catchError((e) => {
|
233
|
+
console.error(createOrbChartsErrorMessage(e))
|
234
|
+
return EMPTY
|
235
|
+
}),
|
237
236
|
shareReplay(1)
|
238
237
|
)
|
239
238
|
const shareAndMergedChartParams$ = chartSubject.chartParams$
|
@@ -258,8 +257,7 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
258
257
|
}))
|
259
258
|
}
|
260
259
|
} catch (e) {
|
261
|
-
//
|
262
|
-
// 驗證失敗仍繼續執行,才不會把 Observable 資料流給中斷掉
|
260
|
+
// 不中斷資料流
|
263
261
|
console.error(createOrbChartsErrorMessage(e))
|
264
262
|
}
|
265
263
|
try {
|
@@ -271,10 +269,10 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
271
269
|
}))
|
272
270
|
}
|
273
271
|
}),
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
272
|
+
catchError((e) => {
|
273
|
+
console.error(createOrbChartsErrorMessage(e))
|
274
|
+
return EMPTY
|
275
|
+
}),
|
278
276
|
shareReplay(1)
|
279
277
|
)
|
280
278
|
|
@@ -402,8 +400,7 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
402
400
|
}))
|
403
401
|
}
|
404
402
|
} catch (e) {
|
405
|
-
//
|
406
|
-
// 驗證失敗仍繼續執行,才不會把 Observable 資料流給中斷掉
|
403
|
+
// 不中斷資料流
|
407
404
|
console.error(createOrbChartsErrorMessage(e))
|
408
405
|
}
|
409
406
|
try {
|
@@ -415,10 +412,10 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
415
412
|
}))
|
416
413
|
}
|
417
414
|
}),
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
415
|
+
catchError((e) => {
|
416
|
+
console.error(createOrbChartsErrorMessage(e))
|
417
|
+
return EMPTY
|
418
|
+
})
|
422
419
|
)
|
423
420
|
}),
|
424
421
|
shareReplay(1)
|
@@ -448,7 +445,8 @@ export const createBaseChart: CreateBaseChart = <T extends ChartType>({
|
|
448
445
|
}
|
449
446
|
} catch (e) {
|
450
447
|
// plugin驗證失敗就不執行
|
451
|
-
|
448
|
+
console.error(createOrbChartsErrorMessage(e))
|
449
|
+
return
|
452
450
|
}
|
453
451
|
|
454
452
|
selectionPlugins
|
@@ -4,10 +4,7 @@ export function createMessagePrefix (status: 'warning' | 'error'): string {
|
|
4
4
|
}
|
5
5
|
|
6
6
|
// throw到最外層的錯誤訊息
|
7
|
-
export function createOrbChartsErrorMessage (e: {
|
8
|
-
message: string // e.message
|
9
|
-
stack: string // e.stack
|
10
|
-
}): string {
|
7
|
+
export function createOrbChartsErrorMessage (e: Error): string {
|
11
8
|
return `${createMessagePrefix('error')} ${e.message}`
|
12
9
|
}
|
13
10
|
|