On Aug 24, 9:14 am, Reinier Zwitserloot <[email protected]> wrote: > But that code snippet is horrible; you should never catch an exception > and 'just log it' - ONLY the very top level should ever do that.
Sorry, I should have given additional example lines in there like doRepairAttempts(); setTaskStatus(myTask); and so on. > Secondly, if you do log-and-swallow, then whatever the heck you do, > don't continue with your method! The problem of doing this in a finally-block means that you start getting a lot of nested blocks - I tried to find an escape from that. - But, well, it was just an idea trying to produce very clear and readable code and at the same time get useful output (for user, admin and developer). Error handling should be done correctly, code should be resistant to bugs and should be readable, context should be kept, ... - yes, error handling is difficult. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
