Class ErrorMsg
- 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 ErrorMsg()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiderror(int line, int col, String text)This method throws an EJBQLException indicating an user error.static voiderror(String text)This method throws an EJBQLException indicating an user error.static voiderror(String text, Throwable cause)This method throws an EJBQLException indicating an user error.static voidfatal(String text)This method is called in the case of an fatal internal error.static voidfatal(String text, Throwable nested)This method is called in the case of an fatal internal error.static voidlog(int level, String text, Throwable nested)This method is called when we want to log an exception in a given level.static voidunsupported(int line, int col, String text)This method throws an UnsupportedOperationException indicating an unsupported feature.
-
-
-
Method Detail
-
error
public static void error(int line, int col, String text) throws EJBQLExceptionThis method throws an EJBQLException indicating an user error.- Parameters:
line- line numbercol- column numbertext- 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 messagecause- 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 UnsupportedOperationExceptionThis method throws an UnsupportedOperationException indicating an unsupported feature.- Parameters:
line- line numbercol- column numbertext- 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 messagenested- the cause of the error- Throws:
EJBQLException- describes the fatal internal error.
-
log
public static void log(int level, String text, Throwable nested) throws EJBQLExceptionThis 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 leveltext- error messagenested- the cause of the error- Throws:
EJBQLException- describes the fatal internal error.
-
-