chessgame

RESTful chessgame developed with kotlin

View on GitHub

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: HttpStatus
HTTP error
exception val exception: String
Name of thrown exception
message val message: String
Error message
path val path: String
URI at which the error was thrown
statusCode val statusCode: Int
HTTP status code
timestamp val timestamp: Date
Timestamp of the thrown error

Functions

toString fun toString(): String
Cast the error response object to String (JSON) Necessary to return the error as JSON if the client has requested