-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Suggestion on Error detail
PostPosted: Tue Aug 09, 2005 10:10 am 
Beginner
Beginner

Joined: Tue Aug 09, 2005 9:43 am
Posts: 30
Location: Lisbon, Portugal
I'm beginning using version 0.9 and feel that some more detail on the error messages could be very useful. Of course that is a general rule, but specifically in the case of property to SQL and SQL to property conversions it would really be great to have messages such as "Couldn't assign <type> value <val> to property <prop> of class <SomeNameSpace.SomeClass>. Type <type> or convertible was expected."

What I'm getting below doesn't really help. Sure, I can debug the source code, but it's so much more time-consuming...


Out: NHibernate.SessionImpl.Execute: could not synchronize database state with session
NHibernate.DateTimeType.Set: Specified cast is not valid.

Stack Trace:
NHibernate.ADOException: could not synchronize database state with session ---> System.InvalidCastException: Specified cast is not valid.
at NHibernate.Type.DateTimeType.Set(IDbCommand st, Object value, Int32 index)
at NHibernate.Type.NullableType.NullSafeSet(IDbCommand cmd, Object value, Int32 index)
at NHibernate.Type.NullableType.NullSafeSet(IDbCommand st, Object value, Int32 index, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Dehydrate(Object id, Object[] fields, Boolean[] includeProperty, IDbCommand st, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Impl.ScheduledInsertion.Execute()
at NHibernate.Impl.SessionImpl.ExecuteAll(IList list)
at NHibernate.Impl.SessionImpl.Execute()
--- End of inner exception stack trace ---
at NHibernate.Impl.SessionImpl.Execute()
at NHibernate.Impl.SessionImpl.Flush()
at NegocioNUnitTests.PessoaColectiva_BT.CT1() in C:\Projectos\P2051B\REI\Sources\NegocioNUnitTests\PessoaColectiva_BT.vb:line 50

P.S.: Oh, I did consider posting on the Suggestions Thread. But it felt so lonely there...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 10, 2005 11:02 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Moved to the development section :)

This is definitivly the kind of improvements that we should do but don't have the time for :?

Anyway, create a Jira issue so that we don't forget it ;)
http://jira.nhibernate.org/

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 5:48 am 
Beginner
Beginner

Joined: Tue Aug 09, 2005 9:43 am
Posts: 30
Location: Lisbon, Portugal
Yes, I understand it definitely takes some time to build that kind of detail into your exception handling. But from my experience, if the thing to be built is complex enough (this being the case), and besides the obvious benefits for the final users, the added value of having it for those building the product is also very great. In a lot of cases, instead of debugging, you just say "Oh! So that's what's happening!" :wink: .

To eradicate lingering doubts, please read section 3.3 at:
http://www.canonical.org/~kragen/tao-of ... mming.html
:lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.