@contrail/util 1.1.3-0 → 1.1.3-1
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.
|
@@ -71,9 +71,13 @@ function timed(options = {}) {
|
|
|
71
71
|
const timer = new Timer();
|
|
72
72
|
timer.start();
|
|
73
73
|
try {
|
|
74
|
-
const result = yield originalMethod.
|
|
74
|
+
const result = yield originalMethod.bind(this)(...args);
|
|
75
75
|
return result;
|
|
76
76
|
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error(`Error in ${propertyKey}:`, error);
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
77
81
|
finally {
|
|
78
82
|
timer.stop();
|
|
79
83
|
const duration = timer.getElapsedTime(options.timeUnit || TimeUnit.MILLISECOND);
|