public static String getErrorMessage(final int code)
	{
		switch (code) {
		case NO_ERROR:
			return "success";
		case HOST_PROTOCOL_TYPE:
			return "host protocol type not supported";
		case VERSION_NOT_SUPPORTED:
			return "protocol version not supported";
		case SEQUENCE_NUMBER:
			return "sequence number out of order";
		case CONNECTION_ID:
			return "no active data connection with that ID";
		case NO_MORE_CONNECTIONS:
			return "could not accept new connection (maximum reached)";
		default:
			return "error code 0x" + Integer.toHexString(code);
		}
	}
public static String getErrorMessage ( final int code ) { switch ( code ) { case NO_ERROR : return "success" ; case HOST_PROTOCOL_TYPE : return "host protocol type not supported" ; case VERSION_NOT_SUPPORTED : return "protocol version not supported" ; case SEQUENCE_NUMBER : return "sequence number out of order" ; case CONNECTION_ID : return "no active data connection with that ID" ; case NO_MORE_CONNECTIONS : return "could not accept new connection (maximum reached)" ; default : return "error code 0x" + Integer . toHexString ( code ) ; } }
Returns a brief description message for an error code.
<p>
For now, only common error codes are translated.<br>
On unknown error code, the string "error code 0x&lt;code&gt;" is returned.

@param code error code to lookup the description
@return string representation of error code