Class DatabaseErrorHelper
java.lang.Object
org.eclipse.dirigible.databases.helpers.DatabaseErrorHelper
public class DatabaseErrorHelper extends Object
Database Error Helper.
-
Constructor Summary
Constructors Constructor Description DatabaseErrorHelper() -
Method Summary
Modifier and Type Method Description static Stringprint(String errorMessage)Return the error as plain text.static Stringprint(Throwable t)Return the error as plain text.static StringtoJson(String errorMessage)Serialize the error as JSON.static StringtoJson(Throwable t)Serialize the error as JSON.
-
Constructor Details
-
DatabaseErrorHelper
public DatabaseErrorHelper()
-
-
Method Details
-
toJson
Serialize the error as JSON.- Parameters:
t- the error- Returns:
- the error as JSON
-
toJson
Serialize the error as JSON.- Parameters:
errorMessage- the error message- Returns:
- the error as JSON
-
print
Return the error as plain text.- Parameters:
t- the error- Returns:
- the error as plain text
-
print
Return the error as plain text.- Parameters:
errorMessage- the error message- Returns:
- the error as plain text
-