static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }
static void throwConnectException(String method, NativeConnectException refusedCause, int err) throws IOException { if (err == refusedCause.expectedErr()) { throw refusedCause; } if (err == ERROR_EALREADY_NEGATIVE) { throw new ConnectionPendingException(); } if (err == ERROR_ENETUNREACH_NEGATIVE) { throw new NoRouteToHostException(); } if (err == ERROR_EISCONN_NEGATIVE) { throw new AlreadyConnectedException(); } if (err == ERRNO_ENOENT_NEGATIVE) { throw new FileNotFoundException(); } throw new ConnectException(method + "(..) failed: " + ERRORS[-err]); }