cavalion-vcl 1.1.65 → 1.1.66
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/entities/Query.js +19 -6
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/entities/Query.js
CHANGED
|
@@ -47,6 +47,18 @@ define(function(require) {
|
|
|
47
47
|
this._monitors = [];
|
|
48
48
|
this._pageReqs = [];
|
|
49
49
|
},
|
|
50
|
+
error: function(e) {
|
|
51
|
+
if(this._onError) {
|
|
52
|
+
this._onError(e);
|
|
53
|
+
} else {
|
|
54
|
+
if(e && e.responseJSON && e.responseJSON.message) {
|
|
55
|
+
console.error(e.responseJSON.message, e);
|
|
56
|
+
throw e;
|
|
57
|
+
}
|
|
58
|
+
console.error(e);
|
|
59
|
+
throw e;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
50
62
|
loaded: function() {
|
|
51
63
|
/** @overrides ../vcl/Compopnent.prototype.loaded */
|
|
52
64
|
return this.inherited(arguments);
|
|
@@ -284,12 +296,7 @@ define(function(require) {
|
|
|
284
296
|
}
|
|
285
297
|
return res;
|
|
286
298
|
}).catch(function(e) {
|
|
287
|
-
|
|
288
|
-
console.error(e.responseJSON.message, e)
|
|
289
|
-
throw e;
|
|
290
|
-
}
|
|
291
|
-
console.error(e);
|
|
292
|
-
throw e;
|
|
299
|
+
this.error(e);
|
|
293
300
|
})
|
|
294
301
|
);
|
|
295
302
|
|
|
@@ -602,6 +609,12 @@ define(function(require) {
|
|
|
602
609
|
/* This method provides an interface to dynamically determine the request criteria, based upon for example user input. This method must return a criteria object. The function receives the criteria as they are currently indicated by its properties. Return null to prevent the request from going out.
|
|
603
610
|
*/
|
|
604
611
|
}
|
|
612
|
+
},
|
|
613
|
+
"onError": {
|
|
614
|
+
type: Type.EVENT,
|
|
615
|
+
f: function(e) {
|
|
616
|
+
/* This method provides an interface to handle errors, if not set an error will be thrown and logged to the console */
|
|
617
|
+
}
|
|
605
618
|
}
|
|
606
619
|
}
|
|
607
620
|
}));
|