Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] IProgressMonitor - canceling operations

Thanks for bringing that recommendation to my attention. I know I used the runtime exception in the makefile generator, even though I check frequently for cancel. More generally, we are going to be moving a lot of these longer running tasks to other threads, but this is probably a good reminder for people implementing the code for those tasks.


> My main beef with the OperationCanceledException is that it is a
> RuntimeException and so does not have to be declared with a throws
> clause and can thus slip through without being caught   As a policy,
> RuntimeExceptions should be used sparingly, to indicate programming
> errors (ArrayOutofBounds, etc.) and not to indicate a normal and
> perfectly valid state of affairs (user clicked the cancel button).
> Thoughts?

Sean Evoy
Rational Software - IBM Software Group
Ottawa, Ontario, Canada

Back to the top