jsf.js_next_gen 1.0.0-beta-8 → 1.0.0-beta-11
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/window/jsf-development.js +7 -5
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/src/main/typescript/impl/AjaxImpl.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +1 -1
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +3 -3
- package/target/impl/AjaxImpl.js +1 -1
- package/target/impl/xhrCore/ErrorData.js +2 -1
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +4 -3
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
|
@@ -611,7 +611,7 @@ var Implementation;
|
|
|
611
611
|
*
|
|
612
612
|
*
|
|
613
613
|
* handles the errors, in case of an onError exists within the context the onError is called as local error handler
|
|
614
|
-
* the registered error handlers in the queue
|
|
614
|
+
* the registered error handlers in the queue received an error message to be dealt with
|
|
615
615
|
* and if the projectStage is at development an alert box is displayed
|
|
616
616
|
*
|
|
617
617
|
* note: we have additional functionality here, via the global config myfaces.config.defaultErrorOutput a function can be provided
|
|
@@ -2054,7 +2054,8 @@ var ErrorData = /** @class */ (function (_super) {
|
|
|
2054
2054
|
return _this;
|
|
2055
2055
|
}
|
|
2056
2056
|
ErrorData.fromClient = function (e) {
|
|
2057
|
-
|
|
2057
|
+
var _a, _b, _c;
|
|
2058
|
+
return new ErrorData("client", (_a = e === null || e === void 0 ? void 0 : e.name) !== null && _a !== void 0 ? _a : '', (_b = e === null || e === void 0 ? void 0 : e.message) !== null && _b !== void 0 ? _b : '', (_c = e === null || e === void 0 ? void 0 : e.stack) !== null && _c !== void 0 ? _c : '');
|
|
2058
2059
|
};
|
|
2059
2060
|
ErrorData.fromHttpConnection = function (source, name, message, responseText, responseCode) {
|
|
2060
2061
|
return new ErrorData(source, name, message, responseText, responseCode, null, "UNKNOWN", ErrorType.HTTP_ERROR);
|
|
@@ -3467,7 +3468,7 @@ var XhrRequest = /** @class */ (function () {
|
|
|
3467
3468
|
}
|
|
3468
3469
|
};
|
|
3469
3470
|
try {
|
|
3470
|
-
|
|
3471
|
+
this.handleError(errorData, true);
|
|
3471
3472
|
}
|
|
3472
3473
|
finally {
|
|
3473
3474
|
resolve(errorData);
|
|
@@ -3502,8 +3503,9 @@ var XhrRequest = /** @class */ (function () {
|
|
|
3502
3503
|
throw e;
|
|
3503
3504
|
}
|
|
3504
3505
|
};
|
|
3505
|
-
XhrRequest.prototype.handleError = function (exception) {
|
|
3506
|
-
|
|
3506
|
+
XhrRequest.prototype.handleError = function (exception, httpError) {
|
|
3507
|
+
if (httpError === void 0) { httpError = false; }
|
|
3508
|
+
var errorData = (httpError) ? ErrorData_1.ErrorData.fromServerError(exception) : ErrorData_1.ErrorData.fromClient(exception);
|
|
3507
3509
|
var eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
3508
3510
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
3509
3511
|
};
|