GemTalk / RemoteServiceReplication

MIT License
0 stars 4 forks source link

Pharo class RsrConnectionClosedBeforeReceivingResponse should be a subclass of Error #147

Closed ericwinger closed 1 week ago

ericwinger commented 7 months ago

A RsrPromise block catch: block can get a RsrConnectionClosedBeforeReceivingResponse. However, RsrConnectionClosedBeforeReceivingResponse is a subclass of RsrAbstractReason not Error. Since the client is effective dead, I think this should be an error to tell the client (and consequently the user) to take more aggressive recovery action.

ericwinger commented 7 months ago

I suppose it would be more proper to request that the class become a subclass of RsrRemoteException

kurtkilpela commented 1 week ago

This class isn't an Error and it isn't ever signaled. Instead, it is used as an argument to a the catch block in #when:catch: or stored into the exception RsrBrokenPromise for retrieval. It is an explanation of why the Promise was broken.

Even if I make this a subclass of Error, it wouldn't actually get signaled.

It does indicate to the users of RSR that no further action can be taken. Note, if a Service attempts to send a message to #remoteSelf, that will raise an RsrConnectionClosed exception.