* Fix java 8 syntax error in UdpEndpoint
This commit is contained in:
parent
510e9137d8
commit
f31911f039
@ -38,6 +38,7 @@ import java.io.IOException;
|
|||||||
import java.net.DatagramPacket;
|
import java.net.DatagramPacket;
|
||||||
import java.net.DatagramSocket;
|
import java.net.DatagramSocket;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
|
||||||
@ -127,8 +128,14 @@ public class UdpEndpoint implements Endpoint
|
|||||||
kernel.enqueueWrite( this, p );
|
kernel.enqueueWrite( this, p );
|
||||||
|
|
||||||
//socket.send(p);
|
//socket.send(p);
|
||||||
} catch( IOException e ) {
|
} catch (Exception e) {
|
||||||
throw new KernelException( "Error sending datagram to:" + address, e );
|
if (e instanceof SocketException) {
|
||||||
|
throw new KernelException("Error sending datagram to:" + address, e);
|
||||||
|
} else if (e instanceof RuntimeException) {
|
||||||
|
throw (RuntimeException) e;
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user