- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody,
my issue is referred to my previous post cannotMakeTypeError .
I'm using now the BuiltInFailures.FamilyFailures.CannotMakeType and I managed to avoid the message error on the screen, forcing the "failure" transaction to ProceedWithCommit; here's my succesful code for that:
public class TypeErrorSwallower : IFailuresPreprocessor { public FailureProcessingResult PreprocessFailures(FailuresAccessor a) { IList<FailureMessageAccessor> failures = a.GetFailureMessages(); foreach( FailureMessageAccessor f in failures ) { FailureDefinitionId id = f.GetFailureDefinitionId(); if( BuiltInFailures.FamilyFailures.CannotMakeTypeCB == id ) { return FailureProcessingResult.ProceedWithCommit; } } return FailureProcessingResult.Continue; } }
What I'm asking now, is if it's possible to make changes to the model when it goes into the PreprocessFailure: suppose that I have a transaction setting the L parameter and a value is causing the failure because it can't make any type, I would change the value of that parameter and then go on with the rest of the code...
I tried to insert a new transaction within the FailurePreprocessor but when I debug the code I found that the Set() causes a new error and no change is executed, I've attached a very simple file with a test-family (made only to reproduce the error) and my code: someone can help me with this?
Is it possible set a parameter to a different value when it comes to the preprocessFailure?
Thanks in advance
Solved! Go to Solution.