UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

24 lines 1.1 kB
import * as Models from '../models'; var ErrorViewModel = (function () { function ErrorViewModel(error) { this.originalError = error; if (error) { this.title = error.title; this.description = error.description; this.errorCode = error.errorCode; this.message = error.message; var stackTrace = error.stackTrace; this.stackTrace = stackTrace && stackTrace.length !== 0 ? stackTrace : null; this.isConcurrencyError = error.category === Models.ErrorCategory.HttpClientError && error.httpErrorCode === Models.HttpStatusCode.PreconditionFailed; } this.description = this.description || "No description available"; this.errorCode = this.errorCode || "No code available"; this.message = this.message || "No message available"; this.stackTrace = this.stackTrace || ["No stack trace available"]; } return ErrorViewModel; }()); export { ErrorViewModel }; //# sourceMappingURL=error-view-model.js.map