net.sourceforge.squirrel_sql.plugins.informix.exception
Class InformixExceptionFormatter

java.lang.Object
  extended by net.sourceforge.squirrel_sql.client.session.event.SessionAdapter
      extended by net.sourceforge.squirrel_sql.plugins.informix.exception.InformixExceptionFormatter
All Implemented Interfaces:
java.util.EventListener, ISessionListener, ExceptionFormatter

public class InformixExceptionFormatter
extends SessionAdapter
implements ISessionListener, ExceptionFormatter

A custom exception formatter for Informix database which provides the offset of the syntax error in the current SQL that had problems. This will also set the cursor position to the location of the offset. This uses the Informix-specific IfmxConnection class which is available in the Informix driver.

Author:
manningr

Constructor Summary
InformixExceptionFormatter(ISession session)
          Constructs a new instance of this ExceptionFormatter to work with the specified session.
 
Method Summary
 void allSessionsClosed()
           
 java.lang.String format(java.lang.Throwable t)
           
 boolean formatsException(java.lang.Throwable t)
           
 void sessionClosed(SessionEvent evt)
           
 void sessionClosing(SessionEvent evt)
           
 
Methods inherited from class net.sourceforge.squirrel_sql.client.session.event.SessionAdapter
connectionClosedForReconnect, reconnected, reconnectFailed, sessionActivated, sessionConnected, sessionFinalized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.squirrel_sql.client.session.event.ISessionListener
connectionClosedForReconnect, reconnected, reconnectFailed, sessionActivated, sessionConnected, sessionFinalized
 

Constructor Detail

InformixExceptionFormatter

public InformixExceptionFormatter(ISession session)
Constructs a new instance of this ExceptionFormatter to work with the specified session.

Parameters:
session - the ISesssion implementation to work with.
Method Detail

format

public java.lang.String format(java.lang.Throwable t)
                        throws java.lang.Exception
Specified by:
format in interface ExceptionFormatter
Throws:
java.lang.Exception
See Also:
ExceptionFormatter.format(java.lang.Throwable)

formatsException

public boolean formatsException(java.lang.Throwable t)
Specified by:
formatsException in interface ExceptionFormatter
See Also:
ExceptionFormatter.formatsException(java.lang.Throwable)

allSessionsClosed

public void allSessionsClosed()
Specified by:
allSessionsClosed in interface ISessionListener
Overrides:
allSessionsClosed in class SessionAdapter
See Also:
ISessionListener.allSessionsClosed()

sessionClosed

public void sessionClosed(SessionEvent evt)
Specified by:
sessionClosed in interface ISessionListener
Overrides:
sessionClosed in class SessionAdapter
See Also:
ISessionListener.sessionClosed(net.sourceforge.squirrel_sql.client.session.event.SessionEvent)

sessionClosing

public void sessionClosing(SessionEvent evt)
Specified by:
sessionClosing in interface ISessionListener
Overrides:
sessionClosing in class SessionAdapter
See Also:
ISessionListener.sessionClosing(net.sourceforge.squirrel_sql.client.session.event.SessionEvent)


Copyright © 2001-2010. All Rights Reserved.