IConfiguration.

ExceptionsOnNotStorable(bool) Method

Summary

configures whether Exceptions are to be thrown, if objects can not be stored.

Syntax

void ExceptionsOnNotStorable(bool flag)

Remarks

configures whether Exceptions are to be thrown, if objects can not be stored.

db4o requires the presence of a constructor that can be used to instantiate objects. If no default public constructor is present, all available constructors are tested, whether an instance of the class can be instantiated. Null is passed to all constructor parameters. The first constructor that is successfully tested will be used throughout the running db4o session. If an instance of the class can not be instantiated, the object will not be stored. By default, execution will continue without any message or error. This method can be used to configure db4o to throw an Db4objects.Db4o.Ext.ObjectNotStorableException if an object can not be stored.

The default for this setting is true.

In client/server environment this setting should be used on both client and server.

Parameters

Name Type Description
flag bool false to not throw Exceptions if objects can not be stored (fail silently).

Return Value

Type Description
void