Package de.srsoftware.tools
Klasse HttpError<NONE>
java.lang.Object
de.srsoftware.tools.container.Error<NONE>
de.srsoftware.tools.HttpError<NONE>
- Typparameter:
NONE- the type of the result that was expected when the error occured
- Alle implementierten Schnittstellen:
de.srsoftware.tools.container.Container<NONE>
public class HttpError<NONE>
extends de.srsoftware.tools.container.Error<NONE>
A special Error type that additionally carries an error code
-
Feldübersicht
Von Klasse geerbte Felder de.srsoftware.tools.container.Error
DATA, EXCEPTIONS, MESSAGE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintcode()return the error code assigned with this errorstatic <T> HttpError<T> create a new HttpError object carrying the passed messagestatic <T> HttpError<T> create a new HttpError object carrying the passed messagestatic <T> HttpError<T> of(int code, Collection<Exception> exceptions, String message, Object... fills) create a new HttpError object carrying the passed messagestatic <T> HttpError<T> create a new HttpError object carrying the passed messagestatic <T> HttpError<T> create a new HttpError object carrying the passed messagestatic <T> HttpError<T> of(int code, Map<String, Object> data, Collection<Exception> exceptions, String message, Object... fills) create a new HttpError object carrying the passed message<NewType> HttpError<NewType> create an HttpError with the same metadata content as this Object, but with different payload typeVon Klasse geerbte Methoden de.srsoftware.tools.container.Error
add, addData, data, error, error, error, error, error, error, exceptions, isEmpty, json, message, optional, stream, streamContained, then, toString, wrapVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden de.srsoftware.tools.container.Container
map
-
Konstruktordetails
-
HttpError
public HttpError(int code, String message, Map<String, Object> data, Collection<Exception> exceptions) create a new Error object carrying the passed message- Parameter:
code- the error codemessage- the message to add to the Error objectdata- (optional) data to carry alongexceptions- (optional) exceptions to wrap
-
-
Methodendetails
-
code
public int code()return the error code assigned with this error- Gibt zurück:
- a numeric error code
-
of
create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codemessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
of
public static <T> HttpError<T> of(int code, Collection<Exception> exceptions, String message, Object... fills) create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codeexceptions- (optional) exceptions to wrapmessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
of
create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codeexception- exceptions to wrapmessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
of
public static <T> HttpError<T> of(int code, Map<String, Object> data, String message, Object... fills) create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codedata- (optional) data to carry alongmessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
of
public static <T> HttpError<T> of(int code, Map<String, Object> data, Collection<Exception> exceptions, String message, Object... fills) create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codedata- (optional) data to carry alongexceptions- (optional) exceptions to wrapmessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
of
public static <T> HttpError<T> of(int code, Map<String, Object> data, Exception exception, String message, Object... fills) create a new HttpError object carrying the passed message- Typparameter:
T- the type of the result expected at the place this error occurred- Parameter:
code- the error codedata- (optional) data to carry alongexception- exception to wrapmessage- the message to add to the Error object, may contain placeholder marksfills- the list of objects to fill the marks- Gibt zurück:
- the created HttpError object
-
transform
create an HttpError with the same metadata content as this Object, but with different payload type- Setzt außer Kraft:
transformin Klassede.srsoftware.tools.container.Error<NONE>- Typparameter:
NewType- the payload type of the returned error- Gibt zurück:
- the transformed Error (new object)
-