Gabriele Monaco <[email protected]> writes:
> That could be a good tradeoff. Users are developer but (although I'm not sure 
> if
> it really happened yet) are not the rvgen developers, they don't need to know
> where exactly the code complained, unless it really broke.
> All errors that are expected (OSError or wrong format) should have a 
> meaningful
> message for the user, I believe by doing that we'd have a pretty clear idea
> where the error came from in the code too (e.g. event parsing, opening a file,
> etc.).
>
> If the code has a bug, then yes we should throw the exception as is, that's 
> why
> I think it's good not to catch Exception, but to catch only the few exceptions
> we know can happen, all others would be bugs.

I second this. We should only catch expected exceptions (e.g. the .dot
file is malformed) and print meaningful message. Otherwise, just leave
it uncaught.

While working with rvgen, I usually just remove the try-catch, because
it takes away all the useful debug information while not offering
anything else.

Nam

Reply via email to