ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Bayon <ibatis....@gmail.com>
Subject Re: Custom Data Access Exception
Date Wed, 05 Oct 2005 17:55:03 GMT
This is correct in SVN version.

On 10/5/05, Habib Ahmed Qureshi <TC02235@emirates.com> wrote:
>
> In business Layer:
> Catch ex As IBatisNet.DataAccess.Exceptions.DataAccessException
> ex.InnerException.InnerException.Message
> End Try
>
> _____________________________________________
> *From: * Habib Ahmed Qureshi
> *Sent: * 05 October 2005 10:26
> *To: * 'user-cs@ibatis.apache.org'
> *Cc: * 'Ron Grabowski'
> *Subject: * Custom Data Access Exception
>
> Hi all.
> I want to throw custom DataAccess Exception from my Dao implementation.
> (I am only using DataAccess and not SQLMapper)
> The problem is when I throw some exception in my DAO implementation it
> gets caught by IBATIS DataAccess and it replaces the exception message with
> its own and this changes my custom message and stuff with my application.
>
> It does so in the DaoProxy.cs
> try
> {
> result = invocation.Method.Invoke(_daoImplementation.DaoInstance,
> arguments);
> }
> catch (Exception e)
> {
> throw new DataAccessException("Unable to intercept method name "+invocation.Method.Name,
> e);
> }
>
> What can I do?
> How to pass custom error messages / exception from my DataAccess
> implementation to above business layer or other components above
> DataAccessLayer
>
> ?
>
> Awaiting quick reply,
>
> *Habib Ahmed Qureshi*
> Software Engineer
> Mob: 00971503966137; Tel: 00971 4 2133873
>

Mime
View raw message