Table of Contents

TTMSMCPTransport.OnError Event

Handler called for every exception the channel catches internally.

API unit family: TMS.MCP.Transport Declaring type: TTMSMCPTransport Type: TProc<Exception>

Syntax

property OnError: TProc<Exception>;

Remarks

Nothing is written anywhere by default: with no handler assigned, internal failures are swallowed silently. Assign it - even just to write to a log - or connection errors, malformed inbound messages and worker-thread failures leave no trace at all. The exception instance passed in is owned by the channel and is not valid after the handler returns, so copy anything that needs to outlive the call. The handler may be called from a worker thread, so it must be safe to run off the main thread.