pt.moredata.widgets
Class ErrorHandle

java.lang.Object
  extended bypt.moredata.widgets.ErrorHandle
Direct Known Subclasses:
ErrorHandler

public class ErrorHandle
extends java.lang.Object

Title:

Description:

Gestão e armazenamento dos erros genérico (para apanhar no try catch
Preocupa-se a gerir as SQLExceptions fazendo um throw expecifico relativo ao que ocorreu. Copyright: Copyright (c)

Company:

Version:
1.0
Author:
Sérgio Alexandre Ferreira

Field Summary
static int INFORMIX
           
static int MY_SQL
           
static int NONE
          Tipificação dos erros de acesso à base de dados
static int ORACLE
           
 
Constructor Summary
ErrorHandle(java.lang.Exception e)
           
ErrorHandle(java.lang.Exception e, java.sql.Connection conn)
           
ErrorHandle(java.lang.Exception e, java.lang.String logName)
           
ErrorHandle(java.lang.Exception e, java.lang.String logName, java.sql.Connection conn)
           
 
Method Summary
 int getDatabaseType()
           
 java.lang.Exception getE()
           
 java.lang.String getErrorCode()
          Retorna o valor do errorCode
 java.lang.String getExceptionClass()
           
 java.lang.String getExceptionTypeMessage()
           
 boolean getExitAfterException()
           
 java.lang.String getMessage()
           
 java.lang.String getSQLState()
          Retorna 0 valor de SQLState
 java.lang.String getStackTrace()
          Escreve a informação do StackTrace
 java.lang.String getTimeStamp()
          Escreve a informação do TimeStamp
 boolean isWrite2Log()
           
 void setDatabaseType(int _databaseType)
           
 void setExitAfterException(boolean value)
           
 void setMessage(java.lang.String _message)
           
 void setWrite2Log(boolean _write2Log)
          Afecta a propriedade que define que se deve escrever no logFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Tipificação dos erros de acesso à base de dados

See Also:
Constant Field Values

INFORMIX

public static final int INFORMIX
See Also:
Constant Field Values

ORACLE

public static final int ORACLE
See Also:
Constant Field Values

MY_SQL

public static final int MY_SQL
See Also:
Constant Field Values
Constructor Detail

ErrorHandle

public ErrorHandle(java.lang.Exception e,
                   java.lang.String logName,
                   java.sql.Connection conn)

ErrorHandle

public ErrorHandle(java.lang.Exception e)

ErrorHandle

public ErrorHandle(java.lang.Exception e,
                   java.sql.Connection conn)

ErrorHandle

public ErrorHandle(java.lang.Exception e,
                   java.lang.String logName)
Method Detail

getE

public java.lang.Exception getE()

getMessage

public java.lang.String getMessage()

getExitAfterException

public boolean getExitAfterException()

getStackTrace

public java.lang.String getStackTrace()
Escreve a informação do StackTrace

Returns:
Stack trace

getTimeStamp

public java.lang.String getTimeStamp()
Escreve a informação do TimeStamp


getErrorCode

public java.lang.String getErrorCode()
Retorna o valor do errorCode


getSQLState

public java.lang.String getSQLState()
Retorna 0 valor de SQLState


setWrite2Log

public void setWrite2Log(boolean _write2Log)
Afecta a propriedade que define que se deve escrever no logFile


isWrite2Log

public boolean isWrite2Log()

getDatabaseType

public int getDatabaseType()

setDatabaseType

public void setDatabaseType(int _databaseType)

setExitAfterException

public void setExitAfterException(boolean value)

setMessage

public void setMessage(java.lang.String _message)

getExceptionClass

public java.lang.String getExceptionClass()

getExceptionTypeMessage

public java.lang.String getExceptionTypeMessage()