plc4x icon indicating copy to clipboard operation
plc4x copied to clipboard

Implement custom exception handling in TriggeredScraperTask

Open frido opened this issue 2 years ago • 2 comments

If there is exception while scraping, the exception is logged on the DEBUG level. https://github.com/apache/plc4x/blob/d2e3dcafee07b9406489bd02c84b1f8fe432601f/plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperTask.java#L204

The user can override this handleException(Exception e) method, but it is not possible to pass custom implementation of TriggeredScraperTask to the TriggeredScraperImpl. There is hard-coded TriggeredScraperTask class: https://github.com/apache/plc4x/blob/d2e3dcafee07b9406489bd02c84b1f8fe432601f/plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java#L202

It should be possible to set something like task factory to the TriggeredScraperImpl.

frido avatar Dec 14 '22 12:12 frido

Yeah ... unfortunately the scraper is sort of a part we are planning on rewriting as the original author is no longer seriously active here and we're not too happy with parts of it. Would this be something you would be willing to help with? I know we just recently had someone step up raising his hand for starting to clean up this part. Perhaps something you could join in on?

chrisdutz avatar Dec 20 '22 08:12 chrisdutz

Hmmm ... are we really waiting for feedback here? If not, I think we can close it.

chrisdutz avatar Aug 16 '24 11:08 chrisdutz