-
May 5th, 2010, 09:20 AM
#1
Skipping based on Throwable.getCause() ?
I'd like to know the best way to configure chunk skippable-exception-classes such that the results of (for example), FlatFileParseException.getCause() could be used as input to the decision rather than the Class hierarchy.
At the moment I am creating a specific kind of exception during line mapping and if that occurs I want to skip the item. However MyException is being caught by DefaultLineMapper and converted to a FlatFileParseException. I think that somewhere down the line the FlatFileParseException (containing MyException as it's cause), is being passed to a BinaryExceptionClassifier which looks at the class hierarchy of FlatFileParseException - it's not aware of Throwable and nested exceptions. This means I have no way of skipping when I throw instances of MyException - I need to skip all instances of FlatFileParseException.
Is this correct and if so how can implement the behaviour I desire - namely skipping only on MyException?
-
May 14th, 2010, 11:14 AM
#2
I think the best way currently is to implement ItemSkipPolicy and inject an instance of your policy instead of configuring the skip-limit and skippable-exceptions in the step.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules