htwdd.chessgame.server.exceptions / ErrorResponseObject
ErrorResponseObject
class ErrorResponseObject
Object to represent a clearly and user comprehensible error message
Author Felix Dimmel
Constructors
| <init> | ErrorResponseObject(timestamp: Date = Date(), statusCode: Int = 500, error: HttpStatus = HttpStatus.INTERNAL_SERVER_ERROR, exception: String = "", message: String = "No message available", path: String = "")Object to represent a clearly and user comprehensible error message |
Properties
| error | val error: HttpStatusHTTP error |
| exception | val exception: StringName of thrown exception |
| message | val message: StringError message |
| path | val path: StringURI at which the error was thrown |
| statusCode | val statusCode: IntHTTP status code |
| timestamp | val timestamp: DateTimestamp of the thrown error |
Functions
| toString | fun toString(): StringCast the error response object to String (JSON) Necessary to return the error as JSON if the client has requested |