lburgazzoli commented on pull request #2766:
URL: https://github.com/apache/camel-k/pull/2766#issuecomment-976294285


   > > > @lburgazzoli the closure pattern looks good.
   > >   
   > > Is it correct to swallow any error that may be detected while closing 
the file ? In my case I experimented with the `multierr` package to combine 
multiple errors but that's also something that I'm not sure about.
   > 
   > The author of the blog post indicates that the _close_ error is ignored, 
because the _write_ error takes precedence. I'm not sure how to interpret that, 
but I guess most importantly, an error is returned, and the caller error 
handling flow is triggered. 
   
   I'm not really convinced about the wording used in the blog as the fact that 
_write_ error takes precedence over the _close_ error is an opinionated choice 
as we are talking about errors that may or may not be related (got bitten hard 
by a similar assumption in the past in the java land, so I'm a little bit 
sensitive about the problem). 
   
   However I do agree that at least the caller is aware of an error.
   Let me try to get the build succeed (may need some help) and I'll try to 
explore if the process can me made simpler
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to