com.caucho.quercus.lib.db
Class PDOError

java.lang.Object
  extended by com.caucho.quercus.lib.db.PDOError

public class PDOError
extends java.lang.Object


Constructor Summary
PDOError()
           
 
Method Summary
 void clear()
          Clear the error if there is one.
 void error(Env env, java.lang.Throwable exception)
          Save an error for subsequent calls to #errorCode and #errorInfo, and depending on the value of setErrmode(com.caucho.quercus.env.Env, int) show nothing, show a warning, or throw an exception.
 int getErrmode()
           
 java.lang.String getErrorCode()
           
 ArrayValue getErrorInfo()
           
 boolean isError()
           
 void notice(Env env, java.lang.String message)
          Show a notice and return a "HY000" general error for subsequent calls to #errorCode and #errorInfo.
 boolean setErrmode(Env env, int value)
          Set's the error mode.
 void unsupportedAttribute(Env env, int attribute)
           
 void unsupportedAttributeValue(Env env, java.lang.Object value)
           
 void warning(Env env, java.lang.String message)
          Show a warning and return a "HY000" general error for subsequent calls to #errorCode and #errorInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDOError

public PDOError()
Method Detail

clear

public void clear()
Clear the error if there is one.


error

public void error(Env env,
                  java.lang.Throwable exception)
Save an error for subsequent calls to #errorCode and #errorInfo, and depending on the value of setErrmode(com.caucho.quercus.env.Env, int) show nothing, show a warning, or throw an exception.


getErrorCode

public java.lang.String getErrorCode()

getErrorInfo

public ArrayValue getErrorInfo()

getErrmode

public int getErrmode()

isError

public boolean isError()

notice

public void notice(Env env,
                   java.lang.String message)
Show a notice and return a "HY000" general error for subsequent calls to #errorCode and #errorInfo.


setErrmode

public boolean setErrmode(Env env,
                          int value)
Set's the error mode.
ERRMODE_SILENT
ERRMODE_WARNING
ERRMODE_EXCEPTION

Returns:
true on success, false on error.

warning

public void warning(Env env,
                    java.lang.String message)
Show a warning and return a "HY000" general error for subsequent calls to #errorCode and #errorInfo.


unsupportedAttribute

public void unsupportedAttribute(Env env,
                                 int attribute)

unsupportedAttributeValue

public void unsupportedAttributeValue(Env env,
                                      java.lang.Object value)