Class 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
      ErrorMsg()  
    • Constructor Detail

      • ErrorMsg

        public ErrorMsg()
    • Method Detail

      • 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.