public int getSystemRecvBufferSize() { if (nonNull(socket)) { try { return socket.getReceiveBufferSize(); } catch (SocketException exc) { Log.error("unexpected exception: %s", exc.getLocalizedMessage()); Log.exception(exc); } } return 0; }
public static IRubyObject ip_address_list(ThreadContext context) { Ruby runtime = context.runtime; try { RubyArray list = RubyArray.newArray(runtime); RubyClass addrInfoCls = runtime.getClass("Addrinfo"); for (Enumeration<NetworkInterface> networkIfcs = NetworkInterface.getNetworkInterfaces() ; networkIfcs.hasMoreElements() ; ) { for (Enumeration<InetAddress> addresses = networkIfcs.nextElement().getInetAddresses() ; addresses.hasMoreElements() ; ) { list.append(new Addrinfo(runtime, addrInfoCls, addresses.nextElement())); } } return list; } catch (SocketException se) { throw sockerr(runtime, se.getLocalizedMessage()); } }
public int getSystemRecvBufferSize() { if (nonNull(socket)) { try { return socket.getReceiveBufferSize(); } catch (SocketException exc) { Log.error("unexpected exception: %s", exc.getLocalizedMessage()); Log.exception(exc); } } return 0; }
public static IRubyObject ip_address_list(ThreadContext context) { Ruby runtime = context.runtime; try { RubyArray list = RubyArray.newArray(runtime); RubyClass addrInfoCls = runtime.getClass("Addrinfo"); for (Enumeration<NetworkInterface> networkIfcs = NetworkInterface.getNetworkInterfaces() ; networkIfcs.hasMoreElements() ; ) { for (Enumeration<InetAddress> addresses = networkIfcs.nextElement().getInetAddresses() ; addresses.hasMoreElements() ; ) { list.append(new Addrinfo(runtime, addrInfoCls, addresses.nextElement())); } } return list; } catch (SocketException se) { throw sockerr(runtime, se.getLocalizedMessage()); } }
public static IRubyObject ip_address_list(ThreadContext context) { Ruby runtime = context.runtime; try { RubyArray list = RubyArray.newArray(runtime); RubyClass addrInfoCls = runtime.getClass("Addrinfo"); for (Enumeration<NetworkInterface> networkIfcs = NetworkInterface.getNetworkInterfaces() ; networkIfcs.hasMoreElements() ; ) { for (Enumeration<InetAddress> addresses = networkIfcs.nextElement().getInetAddresses() ; addresses.hasMoreElements() ; ) { list.append(new Addrinfo(runtime, addrInfoCls, addresses.nextElement())); } } return list; } catch (SocketException se) { throw sockerr(runtime, se.getLocalizedMessage()); } }
public int getSystemSendBufferSize() { if (nonNull(socket)) { try { return socket.getSendBufferSize(); } catch (SocketException exc) { Log.error("unexpected exception: %s", exc.getLocalizedMessage()); Log.exception(exc); } } return 0; }
public static IRubyObject ip_address_list(ThreadContext context) { Ruby runtime = context.runtime; try { RubyArray list = RubyArray.newArray(runtime); RubyClass addrInfoCls = runtime.getClass("Addrinfo"); for (Enumeration<NetworkInterface> networkIfcs = NetworkInterface.getNetworkInterfaces() ; networkIfcs.hasMoreElements() ; ) { for (Enumeration<InetAddress> addresses = networkIfcs.nextElement().getInetAddresses() ; addresses.hasMoreElements() ; ) { list.append(new Addrinfo(runtime, addrInfoCls, addresses.nextElement())); } } return list; } catch (SocketException se) { throw sockerr(runtime, se.getLocalizedMessage()); } }
public int getSystemSendBufferSize() { if (nonNull(socket)) { try { return socket.getSendBufferSize(); } catch (SocketException exc) { Log.error("unexpected exception: %s", exc.getLocalizedMessage()); Log.exception(exc); } } return 0; }
logger.info("exception while iterating network interfaces", e); String msg = ctxt.getText(R.string.ifacesError) + e.getLocalizedMessage(); Toast.makeText(ctxt, msg, Toast.LENGTH_SHORT).show();
/** * Writes the entire content of the message to the output stream and flushes it. * * @param out the stream to write the Request message to. */ @Override public void write(OutputStream out) throws ClientRuntimeException, ProviderException { try { // you would expect these to throw exceptions if the socket has been reset // but they don't. buffer.writeTo(out); out.flush(); } catch (SocketException e){ Log.error("StreamBufferRequest.write(): SocketException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("socket exception", e); } catch (IOException e) { Log.error("StreamBufferRequest.write(): IOException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("stream io exception", e); } } }
/** * Writes the entire content of the message to the output stream and flushes it. * * @param out the stream to write the Request message to. */ @Override public void write(OutputStream out) throws ClientRuntimeException, ProviderException { try { // you would expect these to throw exceptions if the socket has been reset // but they don't. buffer.writeTo(out); out.flush(); } catch (SocketException e){ Log.error("StreamBufferRequest.write(): SocketException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("socket exception", e); } catch (IOException e) { Log.error("StreamBufferRequest.write(): IOException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("stream io exception", e); } } }
/** * Writes the entire content of the message to the output stream and flushes it. * * @param out the stream to write the Request message to. */ // @Override public void write(OutputStream out) throws ClientRuntimeException, ProviderException { try { // you would expect these to throw exceptions if the socket has been reset // but they don't. buffer.writeTo(out); out.flush(); } catch (SocketException e){ Log.error("StreamBufferRequest.write(): SocketException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("socket exception", e); } catch (IOException e) { Log.error("StreamBufferRequest.write(): IOException on write: " + e.getLocalizedMessage()); throw new ClientRuntimeException ("stream io exception", e); } } }
shoalLogger.log(Level.WARNING, "grizzlynetmgr.invalidbindaddr", new Object[]{ex.getLocalizedMessage()});
shoalLogger.log(Level.WARNING, "grizzlynetmgr.invalidbindaddr", new Object[]{ex.getLocalizedMessage()});
throw new LiveWebCacheUnavailableException( e.getLocalizedMessage() + " : " + urlStr );
throw new LiveWebCacheUnavailableException( e.getLocalizedMessage() + " : " + urlStr );
+ (CONTEXT.getConfig().getSocketRetries() - retries) +" retries left. Cause: "+e.getLocalizedMessage(),e);
+ " : " + urlString); } catch (SocketException e) { throw new LiveWebCacheUnavailableException(e.getLocalizedMessage() + " : " + urlString); } catch (SocketTimeoutException e) {
+ " : " + urlString); } catch (SocketException e) { throw new LiveWebCacheUnavailableException(e.getLocalizedMessage() + " : " + urlString); } catch (SocketTimeoutException e) {
error.errorId(TransportReturnCodes.FAILURE); error.sysError(0); error.text(e.getLocalizedMessage());