Package de.srsoftware.tools
Klasse Error<T>
java.lang.Object
de.srsoftware.tools.Error<T>
- Typparameter:
T- The return type for actual results
- Alle implementierten Schnittstellen:
Result<T>
Generic Error class for methods that return Result
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
-
Konstruktordetails
-
Error
Create an Error carrying its cause- Parameter:
cause- a description why the error was returned
-
-
Methodendetails
-
cause
Get the cause of the error.- Gibt zurück:
- return the message describing what caused the error
-
isError
public boolean isError()Beschreibung aus Schnittstelle kopiert:ResultIndicate, whether a given result is an error. -
message
Create an Error object carrying the given cause and add more metadata- Typparameter:
T- the type of the result that was expected- Parameter:
cause- a description why the error was returnedtokens- additional metadata- Gibt zurück:
- the created Error
-
json
public org.json.JSONObject json()Create a json object of the error.- Gibt zurück:
- the json object describing the error.
-