db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

Product News from the Core Team

This blog features product news right from the core developer team, once new features and functions get checked into Subversion, available as Continuous Build every 2 hours.

db4o runtime exception hierarchy is taking shape!

As you may have noticed that , db4o is starting to throw runtime exception since version 6.2. It's taking shape now. Please have a look at the javadoc Db4oException, which is the root of all db4o runtime exception, you'll find following paragraph. It's nice, isn't it?

com.db4o.ext
Class Db4oException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.db4o.foundation.ChainedRuntimeException
                  extended by com.db4o.ext.Db4oException

All Implemented Interfaces:
    java.io.Serializable

Direct Known Subclasses:
BackupInProgressException, ConstraintViolationException, DatabaseClosedException, DatabaseFileLockedException, DatabaseMaximumSizeReachedException, DatabaseReadOnlyException, Db4oIOException, GlobalOnlyConfigException, IncompatibleFileFormatException, InvalidIDException, InvalidPasswordException, OldFormatException, ReflectException

 

Most of them are self-descriptive, and clear enough so that you even don't need to lookup them in the document. But I still recommend you to have a look at ObjectContainer, which is the most important interface for db4o. Here is the javadoc for ObjectContainer#delete():

delete

void delete(java.lang.Object obj) throws Db4oIOException,
                   DatabaseClosedException,
                   DatabaseReadOnlyException

<snip>
    Parameters:
        obj - the object to be deleted from the ObjectContainer.
    Throws:
        Db4oIOException - I/O operation failed or was unexpectedly interrupted.
        DatabaseClosedException - db4o database file was closed or failed to open.
        DatabaseReadOnlyException - database was configured as read-only.
 

We're still continuously improving the exception hiearachy. Any feedbacks/suggestions are very appreciated!
 


Published Tuesday, May 15, 2007 6:55 AM by Andrew Zhang
Filed under:


Comments

 

Product News from the Core Team said:

db4o version 6.3 was released as production and can be downloaded here: http://developer.db4o.com/files/folders/db4o_63/default.aspx

August 21, 2007 7:42 PM
Anonymous comments are disabled