error()

This method is called when there is an error with the communication or when TWS wants to send a message to the client.

void error(int id, int errorCode, String errorString)

Parameter

Description

id

This is the orderId or tickerId of the request that generated the error.

errorCode

For information on error codes, see Error Codes.

errorString

The textual description of the error.

This method is called when exception occurs while handling a request.

void error(Exception e)

Parameter

Description

e

The exception that occurred

This method is called when TWS wants to send an error message to the client. (V1).

void error(String str)

Parameter

Description

str

This is the textual description of the error