Java Doc for StandardException.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » error » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.error 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         org.apache.derby.iapi.error.StandardException

All known Subclasses:   org.apache.derby.impl.store.raw.data.NoSpaceOnPage,  org.apache.derbyTesting.unitTests.services.T_StandardException,  org.apache.derby.impl.store.raw.data.LongColumnException,
StandardException
public class StandardException extends Exception (Code)
StandardException is the root of all exceptions that are handled in a standard fashion by the database code, mainly in the language code.

This class is abstract to ensure that an implementation only throws a specific exception (e.g. TransactionException) which is a sub-class

A method in an iterface in a protocol under com.ibm.db2j.protocol.Database must only throw a StandardException (if it needs to throw an exception). This indicates that the method can throw an exception and therefore its caller must ensure that any resources it allocates will be cleaned up in the event of an exception in the StandardException hierarchy.

Implementations of methods that throw StandardException can have throws clause that are more specific than StandardException.


Inner Class :public static class BadMessageArgumentException extends Throwable

Field Summary
final public static  intREPORT_ALWAYS
    
final public static  intREPORT_DEFAULT
    
final public static  intREPORT_NEVER
    

Constructor Summary
protected  StandardException(String messageID)
    
protected  StandardException(String messageID, Object[] args)
    
protected  StandardException(String messageID, Throwable t, Object[] args)
    

Method Summary
public static  StandardExceptioncloseException()
     A special exception to close a session.
final public  Object[]getArguments()
     Returns the arguments for this exception, if there are any.
final public  intgetErrorCode()
    
public  StringgetErrorProperty(String type)
     Get the error code for an error given a type.
public  StringgetMessage()
     The message stored in the super class Throwable must be set up object creation.
final public  StringgetMessageId()
     Return the message identifier that is used to look up the error message text in the messages.properties file.
final public  ThrowablegetNestedException()
     Returns the nested exception for this exception, if there is one.
final public  StringgetSQLState()
     Return the 5 character SQL State. If you need teh identifier that was used to create the message, then use getMessageId().
public static  StringgetSQLStateFromIdentifier(String messageID)
     Convert a message identifer from org.apache.derby.iapi.reference.SQLState to a SQLState five character string.
final public  intgetSeverity()
    
public static  intgetSeverityFromIdentifier(String messageID)
     Get the severity given a message identifier from org.apache.derby.iapi.reference.SQLState.
public static  StandardExceptioninterrupt(InterruptedException ie)
    
public static  StandardExceptionnewException(String messageID)
    
public static  StandardExceptionnewException(String messageID, Throwable t)
    
public static  StandardExceptionnewException(String messageID, Object a1)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2)
    
public static  StandardExceptionnewException(String messageID, Object a1, Throwable t)
     Dummy overload which should never be called.
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Throwable t)
     Dummy overload which should never be called.
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3, Object a4)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)
    
public static  StandardExceptionnewException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)
    
public static  StandardExceptionnewException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)
    
public static  StandardExceptionnewPreLocalizedException(String MessageID, Throwable t, String localizedMessage)
     Creates a new StandardException using message text that has already been localized.
Parameters:
  MessageID - The SQLState and severity are derived from the ID.
public static  SQLWarningnewWarning(String messageId)
    
public static  SQLWarningnewWarning(String messageId, Object a1)
    
public static  SQLWarningnewWarning(String messageId, Object a1, Object a2)
    
public static  StandardExceptionnormalClose()
    
public static  StandardExceptionplainWrapException(Throwable t)
     Similar to unexpectedUserException but makes no assumtion about when the execption is being called.
final public  intreport()
     Yes, report me.
final public  voidsetNestedException(Throwable nestedException)
     Sets the nested exception for this exception.
final public  voidsetReport(int report)
     Set my report type.
final public  voidsetSeverity(int severity)
    
public  StringtoString()
     Don't print the class name in the toString() method.
public static  StandardExceptionunexpectedUserException(Throwable t)
    

Field Detail
REPORT_ALWAYS
final public static int REPORT_ALWAYS(Code)



REPORT_DEFAULT
final public static int REPORT_DEFAULT(Code)



REPORT_NEVER
final public static int REPORT_NEVER(Code)




Constructor Detail
StandardException
protected StandardException(String messageID)(Code)



StandardException
protected StandardException(String messageID, Object[] args)(Code)



StandardException
protected StandardException(String messageID, Throwable t, Object[] args)(Code)




Method Detail
closeException
public static StandardException closeException()(Code)
A special exception to close a session.



getArguments
final public Object[] getArguments()(Code)
Returns the arguments for this exception, if there are any.



getErrorCode
final public int getErrorCode()(Code)



getErrorProperty
public String getErrorProperty(String type)(Code)
Get the error code for an error given a type. The value of the property messageId.type will be returned, e.g. deadlock.sqlstate.



getMessage
public String getMessage()(Code)
The message stored in the super class Throwable must be set up object creation. At this time we cannot get any information about the object itself (ie. this) in order to determine the natural language message. Ie. we need to class of the objec in order to look up its message, but we can't get the class of the exception before calling the super class message.

Thus the message stored by Throwable and obtained by the getMessage() of Throwable (ie. super.getMessage() in this class) is the message identifier. The actual text message is stored in this class at the first request.




getMessageId
final public String getMessageId()(Code)
Return the message identifier that is used to look up the error message text in the messages.properties file.



getNestedException
final public Throwable getNestedException()(Code)
Returns the nested exception for this exception, if there is one.



getSQLState
final public String getSQLState()(Code)
Return the 5 character SQL State. If you need teh identifier that was used to create the message, then use getMessageId(). getMessageId() will return the string that corresponds to the field in org.apache.derby.iapi.reference.SQLState.



getSQLStateFromIdentifier
public static String getSQLStateFromIdentifier(String messageID)(Code)
Convert a message identifer from org.apache.derby.iapi.reference.SQLState to a SQLState five character string.
Parameters:
  messageID - - the sql state id of the message from cloudscape String - the 5 character code of the SQLState ID to returned to the user



getSeverity
final public int getSeverity()(Code)



getSeverityFromIdentifier
public static int getSeverityFromIdentifier(String messageID)(Code)
Get the severity given a message identifier from org.apache.derby.iapi.reference.SQLState.



interrupt
public static StandardException interrupt(InterruptedException ie)(Code)



newException
public static StandardException newException(String messageID)(Code)



newException
public static StandardException newException(String messageID, Throwable t)(Code)



newException
public static StandardException newException(String messageID, Object a1)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2)(Code)



newException
public static StandardException newException(String messageID, Object a1, Throwable t) throws BadMessageArgumentException(Code)
Dummy overload which should never be called. Only used to detect incorrect usage, at compile time.
Parameters:
  messageID - - the sql state id of the message
Parameters:
  a1 - - Message arg
Parameters:
  t - - Incorrectly placed exception to be nested nothing - always throws
throws:
  BadMessageArgumentException - - always (dummy)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Throwable t) throws BadMessageArgumentException(Code)
Dummy overload which should never be called. Only used to detect incorrect usage, at compile time.
Parameters:
  messageID - - the sql state id of the message
Parameters:
  a1 - - First message arg
Parameters:
  a2 - - Second message arg
Parameters:
  t - - Incorrectly placed exception to be nested nothing - always throws
throws:
  BadMessageArgumentException - - always (dummy)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3, Object a4)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7)(Code)



newException
public static StandardException newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)(Code)



newException
public static StandardException newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8)(Code)



newPreLocalizedException
public static StandardException newPreLocalizedException(String MessageID, Throwable t, String localizedMessage)(Code)
Creates a new StandardException using message text that has already been localized.
Parameters:
  MessageID - The SQLState and severity are derived from the ID. However the text message is not.
Parameters:
  t - The Throwable that caused this exception, null if this exception was not caused by another Throwable.
Parameters:
  localizedMessage - The message associated with this exception.It is the caller's responsibility to ensure that this message is properly localized.See org.apache.derby.iapi.tools.i18n.LocalizedResource



newWarning
public static SQLWarning newWarning(String messageId)(Code)



newWarning
public static SQLWarning newWarning(String messageId, Object a1)(Code)



newWarning
public static SQLWarning newWarning(String messageId, Object a1, Object a2)(Code)



normalClose
public static StandardException normalClose()(Code)



plainWrapException
public static StandardException plainWrapException(Throwable t)(Code)
Similar to unexpectedUserException but makes no assumtion about when the execption is being called. The error is wrapped as simply as possible.



report
final public int report()(Code)
Yes, report me. Errors that need this method to return false are in the minority.



setNestedException
final public void setNestedException(Throwable nestedException)(Code)
Sets the nested exception for this exception.



setReport
final public void setReport(int report)(Code)
Set my report type.



setSeverity
final public void setSeverity(int severity)(Code)



toString
public String toString()(Code)
Don't print the class name in the toString() method.



unexpectedUserException
public static StandardException unexpectedUserException(Throwable t)(Code)




Methods inherited from java.lang.Throwable
native public synchronized Throwable fillInStackTrace()(Code)(Java Doc)
public Throwable getCause()(Code)(Java Doc)
public String getLocalizedMessage()(Code)(Java Doc)
public String getMessage()(Code)(Java Doc)
public StackTraceElement[] getStackTrace()(Code)(Java Doc)
public synchronized Throwable initCause(Throwable cause)(Code)(Java Doc)
public void printStackTrace()(Code)(Java Doc)
public void printStackTrace(PrintStream s)(Code)(Java Doc)
public void printStackTrace(PrintWriter s)(Code)(Java Doc)
public void setStackTrace(StackTraceElement[] stackTrace)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.