Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] TmfDataProvider exception handing

Hi,

You are actually pointing to a serious shortcoming in the current state of TMF. The scheme I had in mind was not to re-throw exceptions but rather to change the signature of ITmfDataRequest.fail() (and possibly cancel()) to take an IStatus parameter. In the case of an exception, the exception itself can be used to populate the status. Implementing handleFailure() in your request would allow you to figure out what happened.

Would that be OK for you?

Regards,
/fc


2010/11/30 Francis Giraldeau <Francis.Giraldeau@xxxxxxxxxxxxxx>
Hi,

I'm using TmfExperiment.sendRequest() with a class where I'm overloading handleData() for event processing. I have a problem with exceptions, because when an exception is throwned in handleData(), there is a general catch in TmfDataProvider that prevent this exception to surface. In such situation, we don't know why a request fail. We can't rethrow checked exception because of the thread, but we may rethrow unchecked exception for programming error...?

Cheer,

Francis

_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev



--
Francois

Back to the top