I seem to be having the same problem described here:
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=8108&HighLight=1
I am using Dependency Injection validator -- code taken from the LLBLgen manual. The validation code works, except the exception it throws is not being caught.
This seems impossible to me, but there it is.
This test passes:
[TestMethod()]
public void ValidateQuestionBeforeSaveTest4()
{
var adapter = new DataAccessAdapter();
var question = new QuestionEntity();
try
{
adapter.SaveEntity(question);
}
catch (ORMEntityValidationException e)
{
Assert.AreEqual("Answer must be specified", e.Message);
}
}
If I run the test in debug mode the exception is NOT caught (I get a popup inside the Validator code), although the execution proceeds into the catch block as though it had been caught.
Same thing when I run this in a Console app. The exception throws up a dialog box as if there was no try/catch, and then proceeds into the catch anyway.
Edit:
Did some more searching on the forum here. As per this thread:
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=4339&HighLight=1
if I disable Just My Code the problem goes away.
This doesn't seem like the right solution though...
I am using VS.Net 2008 and LLBLgen 2.6