nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pvillard31 <...@git.apache.org>
Subject [GitHub] nifi pull request: NIFI-1814 Extended caught exceptions
Date Fri, 06 May 2016 17:12:59 GMT
Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/382#discussion_r62359651
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpResponse.java
---
    @@ -155,9 +155,9 @@ public void onTrigger(final ProcessContext context, final ProcessSession
session
             try {
                 session.exportTo(flowFile, response.getOutputStream());
                 response.flushBuffer();
    -        } catch (final IOException ioe) {
    +        } catch (final Exception e) {
    --- End diff --
    
    Yes I agree with this approach. I though Exception was justified by the fact that if the
exception is not caught, the request is not removed from the session and will be re-queued
(and yield the processor) which can be blocking.
    All things considered, it's cleaner to catch individual exceptions and I'll update the
PR as suggested.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message