Class DatabaseErrorHelper

java.lang.Object
org.eclipse.dirigible.databases.helpers.DatabaseErrorHelper

public class DatabaseErrorHelper
extends Object
Database Error Helper.
  • Constructor Details

  • Method Details

    • toJson

      public static String toJson​(Throwable t)
      Serialize the error as JSON.
      Parameters:
      t - the error
      Returns:
      the error as JSON
    • toJson

      public static String toJson​(String errorMessage)
      Serialize the error as JSON.
      Parameters:
      errorMessage - the error message
      Returns:
      the error as JSON
    • print

      public static String print​(Throwable t)
      Return the error as plain text.
      Parameters:
      t - the error
      Returns:
      the error as plain text
    • print

      public static String print​(String errorMessage)
      Return the error as plain text.
      Parameters:
      errorMessage - the error message
      Returns:
      the error as plain text