我有Spring.Configuration
这样的话:
<objects xmlns="http://www.springframework.net">
<!-- Create SQLite connection -->
<object id="SqlConnection" type="System.Data.SQLite.SQLiteConnection, System.Data.SQLite">
<constructor-arg index="0" value="Data Source=MyDatabase.db"/>
</object>
<!-- Open connection -->
<object type="Spring.Objects.Factory.Config.MethodInvokingFactoryObject, Spring.Core">
<property name="TargetObject">
<ref local="SqlConnection" />
</property>
<property name="TargetMethod" value="Open"/>
</object>
</objects>
那么如果在创建和调用Open()
之后抛出此方法,我如何处理方法MethodInvokingFactoryObject
中的异常?