I think has been resolved in the SVN. The code now looks something like
this:
try
{
result = invocation.Method.Invoke(
_daoImplementation.DaoInstance, arguments);
}
catch (Exception e)
{
throw UnWrapException(e, invocation.Method.Name);
}
Where UnWrapException removes the proxy messages and give you back the
underlying exception.
--- Habib Ahmed Qureshi <[EMAIL PROTECTED]> wrote:
> 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
>
>