Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1290#discussion_r91182574
--- Diff:
nifi-nar-bundles/nifi-hl7-bundle/nifi-hl7-processors/src/main/java/org/apache/nifi/processors/hl7/ExtractHL7Attributes.java
---
@@ -196,8 +196,8 @@ public void process(final InputStream in) throws
IOException {
final Map<String, String> attributes = getAttributes(message,
useSegmentNames, parseSegmentFields);
flowFile = session.putAllAttributes(flowFile, attributes);
getLogger().debug("Added the following attributes for {}: {}",
new Object[]{flowFile, attributes});
- } catch (final HL7Exception e) {
- getLogger().error("Failed to extract attributes from {} due to
{}", new Object[]{flowFile, e});
+ } catch (final Throwable t) {
--- End diff --
Along the lines of what @mattyb149 has stated, catching "throwable" just
feels like a band-aid/blind-fold to cover up shortcomings in other validation
or improper logic. I'd prefer to fix the
processor and framework.
The NPEs should never be thrown and we should definitely track them down,
can you elaborate more? The NumberFormatExceptions, were these a problem with
malformed data or logic errors in the processor?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---