pimelon-ui 0.1.20 → 0.1.21
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 +1 -1
- package/src/resources/resources.js +12 -0
package/package.json
CHANGED
|
@@ -157,6 +157,18 @@ export function createResource(options, vm) {
|
|
|
157
157
|
fn.call(vm, error)
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
// if no error handler is defined, use fallbackErrorHandler
|
|
161
|
+
if (errorFunctions.every((fn) => fn == null)) {
|
|
162
|
+
let errorHandler = getConfig('fallbackErrorHandler')
|
|
163
|
+
if (errorHandler) {
|
|
164
|
+
try {
|
|
165
|
+
errorHandler(error)
|
|
166
|
+
} catch (error) {
|
|
167
|
+
// who handles the error handler?
|
|
168
|
+
console.warn('Error in fallbackErrorHandler', error)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
160
172
|
throw error
|
|
161
173
|
}
|
|
162
174
|
|