@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
49 lines • 1.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebserviceException = void 0;
class WebserviceException {
constructor(data) {
let errorCodeDefault = 0;
this.errorCode = typeof data.errorCode !== "undefined" ? data.errorCode : errorCodeDefault;
let errorMessageDefault = "";
this.errorMessage = typeof data.errorMessage !== "undefined" ? data.errorMessage : errorMessageDefault;
let stackTraceDefault = "";
this.stackTrace = typeof (data === null || data === void 0 ? void 0 : data.stackTrace) !== "undefined" ? data === null || data === void 0 ? void 0 : data.stackTrace : stackTraceDefault;
}
static getErrorCodeDefault() {
return 0;
}
static getErrorCodeDescription() {
return "The error code (use this error code to find further information in the user manual).";
}
static getErrorMessageDefault() {
return "";
}
static getErrorMessageDescription() {
return "The descriptive error message indicating why the operation failed or cannot be executed. This may also contain further hints to solve the problem.";
}
static getStackTraceDefault() {
return "";
}
static getStackTraceDescription() {
return "The Java stack trace relevant to the exception analysis.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new WebserviceException(data);
}
toJson() {
return {
'errorCode': this.errorCode,
'errorMessage': this.errorMessage,
'stackTrace': this.stackTrace,
};
}
clone() {
return WebserviceException.fromJson(this.toJson());
}
}
exports.WebserviceException = WebserviceException;
//# sourceMappingURL=WebserviceException.js.map