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