@tmsfe/tms-core 0.0.72 → 0.0.73
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/package.json
CHANGED
|
@@ -65,7 +65,13 @@ function emptyFunc(): void {
|
|
|
65
65
|
* @param callback
|
|
66
66
|
*/
|
|
67
67
|
function executeFunc(context: any, func: Function, args: any[], callback: Function): any {
|
|
68
|
-
|
|
68
|
+
let value: any;
|
|
69
|
+
try {
|
|
70
|
+
value = func.apply(context, args);
|
|
71
|
+
} catch(e) {
|
|
72
|
+
callback();
|
|
73
|
+
throw e;
|
|
74
|
+
}
|
|
69
75
|
// 如果不会返回promise
|
|
70
76
|
if (!value || !value.then || typeof value.then !== 'function') {
|
|
71
77
|
callback();
|