-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b126
-
generic
In some occasions, the information given by a SocketException could contain some more detail to ease troubleshooting and spot the source code location where it happened. For instance, a little testcase where I constructed a problem would throw an exception like this:
java.net.SocketException: Bad file number
at java.net.NetworkInterface.getAll(java.base@9-internal/Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(java.base@9-internal/NetworkInterface.java:343)
at com.sap.cl.NetworkInterfaceList8.printInterfaces(NetworkInterfaceList8.java:18)
at com.sap.cl.NetworkInterfaceList8.main(NetworkInterfaceList8.java:105)
However, native method java.net.NetworkInterface.getAll dives into several other methods and there are quite a few places where socket exceptions could happen. The information should be extended to something like this:
java.net.SocketException: ioctl SIOCGSIZIFCONF failed: Bad file number
at java.net.NetworkInterface.getAll(java.base@9-internal/Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(java.base@9-internal/NetworkInterface.java:343)
at com.sap.cl.NetworkInterfaceList8.printInterfaces(NetworkInterfaceList8.java:18)
at com.sap.cl.NetworkInterfaceList8.main(NetworkInterfaceList8.java:105)
java.net.SocketException: Bad file number
at java.net.NetworkInterface.getAll(java.base@9-internal/Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(java.base@9-internal/NetworkInterface.java:343)
at com.sap.cl.NetworkInterfaceList8.printInterfaces(NetworkInterfaceList8.java:18)
at com.sap.cl.NetworkInterfaceList8.main(NetworkInterfaceList8.java:105)
However, native method java.net.NetworkInterface.getAll dives into several other methods and there are quite a few places where socket exceptions could happen. The information should be extended to something like this:
java.net.SocketException: ioctl SIOCGSIZIFCONF failed: Bad file number
at java.net.NetworkInterface.getAll(java.base@9-internal/Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(java.base@9-internal/NetworkInterface.java:343)
at com.sap.cl.NetworkInterfaceList8.printInterfaces(NetworkInterfaceList8.java:18)
at com.sap.cl.NetworkInterfaceList8.main(NetworkInterfaceList8.java:105)