FileDocCategorySizeDatePackage
ErrorMsg.javaAPI DocGlassfish v2 API6157Fri May 04 22:35:06 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc

ErrorMsg

public class ErrorMsg extends Object
author
Michael Bouschen
version
0.1

Fields Summary
protected String
context
protected static final ResourceBundle
messages
I18N support
private static com.sun.jdo.spi.persistence.utility.logging.Logger
logger
The logger
Constructors Summary
Methods Summary
public voiderror(int line, int col, java.lang.String msg)
Indicates an error situation.

param
line line number
param
col column number
param
msg error message

        JDOQueryException ex;
        if (line > 1)
        {
            // include line and column info
            Object args[] = {context, new Integer(line), new Integer(col), msg};
            ex = new JDOQueryException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msglinecolumn", args)); //NOI18N
        }
        else if (col > 0)
        {
            // include column info
            Object args[] = {context, new Integer(col), msg};
            ex = new JDOQueryException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msgcolumn", args)); //NOI18N
        }
        else 
        {
            Object args[] = {context, msg};
            ex = new JDOQueryException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msg", args)); //NOI18N
        }
        logger.throwing("jqlc.ErrorMsg", "error", ex);
        throw ex;
	
public voidfatal(java.lang.String msg)
Indicates a fatal situation (implementation error).

param
msg error message

        JDOFatalInternalException ex = new JDOFatalInternalException(msg);
        logger.throwing("jqlc.ErrorMsg", "fatal", ex);
        throw ex;
	
public voidfatal(java.lang.String msg, java.lang.Exception nested)
Indicates a fatal situation (implementation error).

param
msg error message

        JDOFatalInternalException ex = new JDOFatalInternalException(msg, nested);
        logger.throwing("jqlc.ErrorMsg", "fatal", ex);
        throw ex;
	
public java.lang.StringgetContext()

    
         
      
    
        return context;
    
public voidsetContext(java.lang.String name)

        context = name;
    
public voidunsupported(int line, int col, java.lang.String msg)
Indicates that a feature is not supported by the current release.

param
line line number
param
col column number
param
msg message

        JDOUnsupportedOptionException ex;
        if (line > 1)
        {
            // include line and column info
            Object args[] = {context, new Integer(line), new Integer(col), msg};
            ex = new JDOUnsupportedOptionException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msglinecolumn", args)); //NOI18N
        }
        else if (col > 0)
        {
            // include column info
            Object args[] = {context, new Integer(col), msg};
            ex = new JDOUnsupportedOptionException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msgcolumn", args)); //NOI18N
                                                                         
        }
        else 
        {
            Object args[] = {context, msg};
            ex = new JDOUnsupportedOptionException(I18NHelper.getMessage(
                messages, "jqlc.errormsg.generic.msg", args)); //NOI18N
        }	
        logger.throwing("jqlc.ErrorMsg", "unsupported", ex);
        throw ex;