Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

Re: [NHibernate-development] NHibernate proxies losing
 exceptionstack-trace

Richard Brown

2008-01-27

Replies: Find Java Web Hosting

Author LoginPost Reply
 
Isn't it because code that uses the exceptions for business logic might need to rely on the original exception type?
 
E.g., the client might rely on getting specific exceptions like ...
 
try
{
    DomainModel.CreateBanana("banana name", "banana description");
}
catch(DuplicateBananaException dbne)
{
    MessageBox("There is already a banana called " + dbne.DuplicateBanana.Name);
}
 
 

From: Ayende Rahien
Sent: Saturday, January 26, 2008 11:38 PM
To: the NHibernate development list
Subject: Re: [NHibernate-development] NHibernate proxies losing exceptionstack-trace

Is there any reason to go with this approach over simply throwing a HibernateException() with this as the inner exception?

On 1/26/08, Richard Brown <fluke_fan@hotmail.com> wrote:
Hi,
 
I originally posted in the forum, and was asked to repost to the mailing list:
 
I've attached a patch that keeps the exception stack-trace after an exception is re-thrown from a proxy.
 
Could someone take a look and see if they think it is worth applying the patch to NHibernate?

Thanks,
    Richard

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nhibernate-development




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.