On Mon, Oct 7, 2013 at 2:20 PM, Erik Bernhardson <ebernhardson@wikimedia.org
wrote:
Are there any concerns with the Flow project moving forward and utilizing this as our primary error handling mechanism rather than returning false/null?
What's wrong with just using the Status class itself? And depending on the answer to that question, would it be possible to improve the Status class in core first, and then use the improved version. That way everybody can use this new preferred error handling structure.
Also, just to be clear, while I do like this method of handling better (being a big fan of the Status class myself), it is not a complete replacement for exceptions. As mentioned, exceptions can be annoying because they just randomly traverse up the call stack until they're hopefully caught. However, sometimes (only sometimes) this is intentional. For example, when a SpecialPage throws an ErrorPageError, which just bypasses all logic and shows a nice error page. Usually errors that are fatal to the request, i.e., once they occur the request can no longer continue, work well with exceptions.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science