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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pimelon-ui",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -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