java - Socket Exception - How to get original socket from Socket Exception object -


i have 1 method transfers data 1 socket another. whenever there problem either on socket need detect socket has caused socket exception. possible detect socket exception object ?

not exception itself, can context. if code manipulates 1 socket, exception must relate socket.

it sounds not handling exceptions @ appropriate level, instead handling (catching) low level exception @ high level part of program, , expecting able low level handling @ point.

consider catching exception @ intermediate level, partially handling it, rethrowing it. might want exception translation (chaining) @ point.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -