Topic Path: Symbol Reference > Classes > TIdRemoteCMDServer Class > TIdRemoteCMDServer Methods > SendError Method
ContentsIndexHome
PreviousUpNext
TIdRemoteCMDServer.SendError Method

Sends an error message to either the standard error connection or the client connection.

procedure SendError(
    AThread: TIdContext; 
    AStdErr: TIdTCPClient; 
    AMsg: String
);
Parameters 
Description 
AThread 
Client connection context for the error message.
 
AStdErr 
Standard error connection to use for the error message.
 
AMsg 
Error message to send to the client connection. 

SendError is a procedure used to send the error message in AMsg to the context for the client connection in AThread using the standard error connection in AStdErr. 

SendError writes the value #1 (Decimal 1) to the connection in AThread to indicate that an error condition has occurred. When AStdErr contains a valid TCP connection for a non-zero client port number, the error message in AMsg is written to the connection in AStdErr. When AStdErr dopes not contain a valid TCP connection, the error message in AMsg is written to the connection in AThread. 

Use SendResult to return values that occur during successful execution of the command for the client connection.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.