Checking which exception occurred from AfterSave


Author
Message
Bruce Palmer
Bruce Palmer
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: Forum Members
Posts: 18, Visits: 33
Hi guys,



I'm trying to gracefully handle an SqlException, "Violation of UNIQUE KEY constraint...".



To stop the exception being thrown and showing the default error message, I'm setting the business objects ErrorSavingMode property to ConitnueOnError. In the forms AfterSave event I can see e.SaveUndoResult, which is set to CompletedWithExceptions.



So, in the forms AfterSave event I know that an exception occurred, but I'm not sure how to check which exception. I want to check this to make sure it really is a "Violation of UNIQUE KEY constraint..." exception and not something else.



Any suggestions?



Regards,

Bruce

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search