modality-kit 0.2.1 → 0.2.2
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/index.js +4 -1
- package/dist/types/util_error.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -226,9 +226,12 @@ var getLoggerInstance = ModalityLogger.getInstance.bind(ModalityLogger);
|
|
|
226
226
|
var logger = getLoggerInstance("General Error");
|
|
227
227
|
|
|
228
228
|
class ErrorCode extends Error {
|
|
229
|
-
constructor(message) {
|
|
229
|
+
constructor(message, originalError) {
|
|
230
230
|
super(message);
|
|
231
231
|
this.name = this.constructor.name;
|
|
232
|
+
if (originalError) {
|
|
233
|
+
this.cause = originalError;
|
|
234
|
+
}
|
|
232
235
|
}
|
|
233
236
|
}
|
|
234
237
|
function withErrorHandling(fn, operation) {
|
package/package.json
CHANGED