/// <exception cref="System.Exception"></exception> public virtual void TestExceptionInUpdateCallback() { BooleanByRef doThrow = new BooleanByRef(); EventRegistryFactory.ForObjectContainer(Db()).Updated += new System.EventHandler <Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_42(doThrow).OnEvent); ExceptionsInCallbackTestCase.Holder holder = new ExceptionsInCallbackTestCase.Holder (); ExceptionsInCallbackTestCase.Item item = new ExceptionsInCallbackTestCase.Item(); Store(holder); Store(item); Commit(); doThrow.value = true; holder.list = new ArrayList(); holder.list.Add(item); try { Db().Store(holder, int.MaxValue); } catch (Exception) { } // rex.printStackTrace(); Checkdb(); Commit(); Checkdb(); Reopen(); Checkdb(); }
/// <exception cref="System.Exception"></exception> public virtual void TestExceptionInUpdateCallback() { BooleanByRef doThrow = new BooleanByRef(); EventRegistryFactory.ForObjectContainer(Db()).Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_42(doThrow).OnEvent); ExceptionsInCallbackTestCase.Holder holder = new ExceptionsInCallbackTestCase.Holder (); ExceptionsInCallbackTestCase.Item item = new ExceptionsInCallbackTestCase.Item(); Store(holder); Store(item); Commit(); doThrow.value = true; holder.list = new ArrayList(); holder.list.Add(item); try { Db().Store(holder, int.MaxValue); } catch (Exception) { } // rex.printStackTrace(); Checkdb(); Commit(); Checkdb(); Reopen(); Checkdb(); }