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.  [ 1 post ] 
Author Message
 Post subject: Contribution for mapping errors detection
PostPosted: Fri Sep 29, 2006 9:57 am 
Newbie

Joined: Fri Sep 29, 2006 9:37 am
Posts: 1
Location: Buenos Aires, Argentina
Hi!

I'm new to a NHibernate and Hibernate (now I'm using both) and I had my first problem. I had an error in a mapping file (one of many) and all I got was an XMLException with line numbers and everything but no way to determine which mapping file was wrong.
I found that modifying AssemblyHbmOrderer.cs, method GetHbmFiles and adding a catch block in line 112, it's easy to return extra information on the error.
I only added:
Code:
catch(Exception e)
{
       throw new MappingException(string.Format("Error reading mapping file [{0}]", fileName), e);
}

I hope it's usefull.

Greetings,
Ariel Popovsky


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

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.