Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Fwd: [cdt-dev] [DSF] LaunchUtils.getGDBPath

On Tue, Jun 29, 2010 at 9:00 AM, Vladimir Prus
<vladimir@xxxxxxxxxxxxxxxx> wrote:
> On Tuesday 29 June 2010 16:46:48 Doug Schaefer wrote:
>
>> There's a lot of code like written like that in the early days. At the
>> very least, if we're going to catch a CoreException, we should log it.
>> Utility methods like this should probably not catch it and have it
>> bubble up higher in the stack so that better recovery can be made.
>> Assuming the default probably isn't the right recovery anyway.
>
> Frankly, I am not sure checked exception is appropriate here. At least,
> I have not yet (in 4 years) found a place where adding CoreException to
> a throws specification of a method communicates anything of much interest --
> CoreException is way too generic to give a client a chance at intelligent
> error recovery.

True, and error recovery when CoreExceptions are thrown is unlikely
anyway. They're usually caused by some by some bigger system problem
that you can't really do much about. Passing it on really just gives
the higher level entity an opportunity to put an error message with
more context about what was going on. Mind you that often isn't useful
either.

But I do agree that catching and ignoring is never the right thing.


Back to the top