diff options
author | Don Anderson <dda@ddanderson.com> | 2014-10-23 10:45:31 -0400 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2014-10-23 10:45:31 -0400 |
commit | e2ebc73274ba8bf1bf68fb9a4cd7b02b9464a6a4 (patch) | |
tree | 9bdfb3093f294421e310673843f7f035a6f120f9 | |
parent | 3d3c29279730c27fc9f4df95fc3b40bb27bae99f (diff) | |
download | mongo-e2ebc73274ba8bf1bf68fb9a4cd7b02b9464a6a4.tar.gz |
Integrate new Java exception classes into java version of doc.
-rw-r--r-- | lang/java/Makefile.am | 2 | ||||
-rw-r--r-- | lang/java/wiredtiger.i | 2 | ||||
-rw-r--r-- | src/docs/error-handling.dox | 11 | ||||
-rw-r--r-- | src/docs/spell.ok | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/lang/java/Makefile.am b/lang/java/Makefile.am index eb51fa43297..2d82a81f99c 100644 --- a/lang/java/Makefile.am +++ b/lang/java/Makefile.am @@ -24,10 +24,10 @@ JAVA_SRC = \ $(JAVADESTFULL)/PackOutputStream.java \ $(JAVADESTFULL)/PackUtil.java \ $(JAVADESTFULL)/Session.java \ - $(JAVADESTFULL)/WiredTigerRollbackException.java \ $(JAVADESTFULL)/WiredTigerException.java \ $(JAVADESTFULL)/WiredTigerPackingException.java \ $(JAVADESTFULL)/WiredTigerPanicException.java \ + $(JAVADESTFULL)/WiredTigerRollbackException.java \ $(JAVADESTFULL)/wiredtiger.java \ $(JAVADESTFULL)/wiredtigerConstants.java \ $(JAVADESTFULL)/wiredtigerJNI.java \ diff --git a/lang/java/wiredtiger.i b/lang/java/wiredtiger.i index 3a082ec3fb5..0e0a2bb12b1 100644 --- a/lang/java/wiredtiger.i +++ b/lang/java/wiredtiger.i @@ -94,7 +94,7 @@ static void throwWiredTigerException(JNIEnv *jenv, int err) { excep = NULL; if (err == WT_PANIC) clname = "com/wiredtiger/db/WiredTigerPanicException"; - else if (err == WT_DEADLOCK) + else if (err == WT_ROLLBACK) clname = "com/wiredtiger/db/WiredTigerRollbackException"; else clname = "com/wiredtiger/db/WiredTigerException"; diff --git a/src/docs/error-handling.dox b/src/docs/error-handling.dox index ea8b721bd7d..078eabf57a6 100644 --- a/src/docs/error-handling.dox +++ b/src/docs/error-handling.dox @@ -13,9 +13,18 @@ range. Informational return values, like <code>wiredtiger.WT_NOTFOUND</code> or <code>wiredtiger.WT_DUPLICATE_KEY</code> or 0 (success), are directly returned by APIs. More severe errors -are thrown as \c WiredTigerException, which must be caught by the +are thrown as \c WiredTigerException, which may be caught by the application. +The \c WiredTigerRollbackException is a specific type of \c WiredTigerException, +it is thrown when there is a conflict between concurrent operations. +An application that catches this exception should call rollback() on +the relevant transaction, and retry as necessary. + +The \c WiredTigerPanicException is a specific type of \c WiredTigerException, +it is thrown when there is an underlying problem that requires the +application to exit and restart. + The following is a complete list of possible WiredTiger-specific return values, all constants defined in the com.wiredtiger.db.wiredtiger class: @m_else diff --git a/src/docs/spell.ok b/src/docs/spell.ok index 5f5cd566ac9..68bcfc24bb6 100644 --- a/src/docs/spell.ok +++ b/src/docs/spell.ok @@ -74,6 +74,8 @@ WiredTiger's WiredTigerCheckpoint WiredTigerException WiredTigerLog +WiredTigerPanicException +WiredTigerRollbackException WiredTigerTestCase Za aR |