You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of errors that caused by unexpected behavior of the other side's RTO port will just lead to panic.
However, especially in Foundry context, the other port might have been implemented by 3rd party and could be unreliable.
In this kind of cases, user will just want to handle the error, not panic.
One trivial solution is adding a Failed state for the RTO context. The context will be on Failed state when it encounters unexpected protocol error, and will be stopped. Users can notice this, and can handle with theirs means.
One drawback of supporting such error handling is the interface of service object; it might be mandatory to all methods to have Result<> as return types.
You can optionally use an error-handleable trait that is compatible with the original one.
In such special trait, all its methods will have Result<OriginalReturnValue, RtoError> by the macro.
Service implementor will never care of this, because error handling is completely optional in runtime, by the client side. Thus, Error will never be serialized and go through the transport.
Call handling fail
Errors will be reported to the Context.
The server might just ignore and retry to recv() and send() depending on the type of error
Most of errors that caused by unexpected behavior of the other side's RTO port will just lead to panic.
However, especially in Foundry context, the other port might have been implemented by 3rd party and could be unreliable.
In this kind of cases, user will just want to handle the error, not panic.
One trivial solution is adding a
Failed
state for the RTO context. The context will be onFailed
state when it encounters unexpected protocol error, and will be stopped. Users can notice this, and can handle with theirs means.One drawback of supporting such error handling is the interface of service object; it might be mandatory to all methods to have
Result<>
as return types.Depends on #76
Depends on #83
The text was updated successfully, but these errors were encountered: