https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37895
--- Comment #19 from Emily Lamancusa (emlam) <[email protected]> --- Yeah, there's definitely room for developer choice here! My main concern with having try/catch in skeleton.pl (which I'll admit I haven't articulated well) is that if we don't catch the exception at all, the upstream methods will catch and handle it, but if we catch it "wrong", we can actively break the upstream error handling. (e.g. exit(1) breaks both error and success reporting in CLI; catching an error that should stop the database upgrade and forgetting to rethrow means it will not stop the upgrade anymore; etc) Since a "wrong" try/catch can be worse than no try/catch, I think it's better for maintainability if developers make the active choice to catch the exception when they do have a reason to do special handling, rather than have the try/catch in the template by default. I'd certainly agree with keeping both templates on the wiki as a "simple mode" vs "advanced mode" choice for developers, though! Or even both in the template if you think there's a benefit to doing it that way. Either way, we should also document the behavior when the exception isn't caught. :) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
