Errors are anything that gets the build wrong. Exceptions should be raised in case of an error, but of course they aren't always. E.g., if a script has a non-zero return code, or if a file is only partially fetched.
Good error handling is not just halting on an error. You have to show everything that led up to the error, hopefully leave out some things that are distracting, give a clear explanation of the error. If it's an error that is not entirely unexpected, then there's other ways to gracefully handle it that go beyond ignoring or fully aborting because of the error. If it is a fatal but expected error you should suggest ways of resolving the error in the system.
errors...
Posted bychrismat
2008-06-22 10:15 AM
Given the way it works, I don't see how most of the things you mention would be the responsibility of buildit. "Show everything that led up to the error": yep, it does that. "Hopefully leave out some things that are distracting": buildit leaves it up to each task to be verbose or not. "there's other ways to gracefully handle it that go beyond ignoring or fully aborting because of the error": yep, this is what custom 'commands' in buildit let you do. "If it is a fatal but expected error you should suggest ways of resolving the error in the system.": again, up to each task.
I think this error handling stuff is a red herring. I suspect instead that it's far easier to write a build system than it will ever be to understand someone else's, *especially* when you walk up to someone else's already-written build and try to hack on it instead of starting from scratch.
Good error handling is not just halting on an error. You have to show everything that led up to the error, hopefully leave out some things that are distracting, give a clear explanation of the error. If it's an error that is not entirely unexpected, then there's other ways to gracefully handle it that go beyond ignoring or fully aborting because of the error. If it is a fatal but expected error you should suggest ways of resolving the error in the system.
I think this error handling stuff is a red herring. I suspect instead that it's far easier to write a build system than it will ever be to understand someone else's, *especially* when you walk up to someone else's already-written build and try to hack on it instead of starting from scratch.
Replies to this comment