Table of Contents

TTMSMCPCustomClientConnection.OnError Event

Occurs when a request fails or the server reports an error.

API unit family: TMS.MCP.Client.Connection Declaring type: TTMSMCPCustomClientConnection

Syntax

OnError: TTMSMCPClientServerErrorEvent;

Remarks

Raised on the main thread, and the same failure is also written to the log at error severity. A waiting caller is released with the error text before the event is raised. The two error codes that make the connection fall back to the legacy handshake are handled internally and do not reach this event.

Parameters

Name Description
Sender Connection the failure belongs to.
AId Identifier of the request that failed, or nil when the failure is not tied to one.
ACode Protocol error code as reported by the server.
AErrorMessage Description of the failure. It is the same text a waiting caller has already been released with, so the handler reports it rather than acting on it.