java.lang.Object
com.sun.jdo.spi.persistence.support.ejb.ejbqlc.ErrorMsg

public class ErrorMsg extends Object
This is a helper class to report error messages from the EJBQL compiler.
Author:
Michael Bouschen, Shing Wai Chan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    error(int line, int col, String text)
    This method throws an EJBQLException indicating an user error.
    static void
    error(String text)
    This method throws an EJBQLException indicating an user error.
    static void
    error(String text, Throwable cause)
    This method throws an EJBQLException indicating an user error.
    static void
    fatal(String text)
    This method is called in the case of an fatal internal error.
    static void
    fatal(String text, Throwable nested)
    This method is called in the case of an fatal internal error.
    static void
    log(int level, String text, Throwable nested)
    This method is called when we want to log an exception in a given level.
    static void
    unsupported(int line, int col, String text)
    This method throws an UnsupportedOperationException indicating an unsupported feature.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ErrorMsg

      public ErrorMsg()
  • Method Details

    • error

      public static void error(int line, int col, String text) throws EJBQLException
      This method throws an EJBQLException indicating an user error.
      Parameters:
      line - line number
      col - column number
      text - error message
      Throws:
      EJBQLException - describes the user error.
    • error

      public static void error(String text, Throwable cause) throws EJBQLException
      This method throws an EJBQLException indicating an user error.
      Parameters:
      text - error message
      cause - the cause of the error
      Throws:
      EJBQLException - describes the user error.
    • error

      public static void error(String text) throws EJBQLException
      This method throws an EJBQLException indicating an user error.
      Parameters:
      text - error message
      Throws:
      EJBQLException - describes the user error.
    • unsupported

      public static void unsupported(int line, int col, String text) throws UnsupportedOperationException
      This method throws an UnsupportedOperationException indicating an unsupported feature.
      Parameters:
      line - line number
      col - column number
      text - message
      Throws:
      UnsupportedOperationException - describes the unsupported feature.
    • fatal

      public static void fatal(String text) throws EJBQLException
      This method is called in the case of an fatal internal error.
      Parameters:
      text - error message
      Throws:
      EJBQLException - describes the fatal internal error.
    • fatal

      public static void fatal(String text, Throwable nested) throws EJBQLException
      This method is called in the case of an fatal internal error.
      Parameters:
      text - error message
      nested - the cause of the error
      Throws:
      EJBQLException - describes the fatal internal error.
    • log

      public static void log(int level, String text, Throwable nested) throws EJBQLException
      This method is called when we want to log an exception in a given level. Note that all other methods in this class do not log a stack trace.
      Parameters:
      level - log level
      text - error message
      nested - the cause of the error
      Throws:
      EJBQLException - describes the fatal internal error.