Hi Dario,I don't have Resharper or TestDriven.Net - is there any chance you could add a Console.WriteLine(ae); at line 137 so I could see the whole stack-trace that's getting thrown?Thanks,RichardFrom: Dario QuintanaSent: Saturday, February 09, 2008 5:32 PMSubject: Re: [NHibernate-development] NHibernate proxies losingexceptionstack-traceIn r3267 was applied the patch but I run the tests using Resharper or TestDriven and I get failed here:
NHibernate.Test.ProxyInterface.CastleProxyFixture at this method: ExceptionStackTrace().
Error:
TestCase 'NHibernate.Test.ProxyInterface.CastleProxyFixture.ExceptionStackTrace'
failed: next on exception stack is Level1()
D:\src\NHibernate\nhibernate\src\NHibernate.Test\ProxyInterface\CastleProxyFixture.cs(141,0): at NHibernate.Test.ProxyInterface.CastleProxyFixture.ExceptionStackTrace()
15:21:57,593 ERROR PocoEntityTuplizer:136 - Getters of lazy classes cannot be final: NHibernate.Test.ProxyInterface.CastleProxyImpl.Name
15:21:57,625 ERROR PocoEntityTuplizer:128 - Setters of lazy classes cannot be final: NHibernate.Test.ProxyInterface.CastleProxyImpl.Name
On Jan 27, 2008 2:56 PM, Karl Chu <kchu@koah.net> wrote:
I agree that preserving the stack trace is a good thing. I have applied the patch to the trunk with one modification: The call to set the private field _remoteStackTraceString is changed to a call to the internal method Exception.InternalPreserveStackTrace().
Thanks for the patch Richard.
Karl
On Jan 27, 2008 2:31 AM, Richard Brown <fluke_fan@hotmail.com> wrote:
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 RahienSent: Saturday, January 26, 2008 11:38 PMSubject: Re: [NHibernate-development] NHibernate proxies losing exceptionstack-traceIs 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.The patch can also be downloaded from: http://freespace.virgin.net/richard.brown0308/NHibernateExceptionStack.patchCould 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@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
--
Dario Quintana
http://darioquintana.com.ar
-------------------------------------------------------------------------
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