}
});
} catch (Throwable t) {
if (!processThrowable(t, session)) {
ErrorCollector collector = new ErrorCollector();
<BUG>final Object toCall = endpoint != null ? endpoint :
</BUG>
componentProvider.getInstance(endpointClass, session, collector);
if (toCall != null) {
<BUG>if (endpoint != null) {
((Endpoint) toCall).onError(session, t);</BUG>
} else {

}
} catch (Throwable t) {
if (!processThrowable(t, session)) {
ErrorCollector collector = new ErrorCollector();
final Object toCall = programmaticEndpoint ? endpoint :
componentProvider.getInstance(endpointClass, session, collector);
if (toCall != null) {
if (programmaticEndpoint) {
((Endpoint) toCall).onError(session, t);
} else {
