replace google protobuf exception to kotlin exception
This commit is contained in:
@@ -26,6 +26,7 @@ object Client {
|
||||
|
||||
fun sendRequest(request: HttpRequest, host: String, port: Int, carUid: Int) {
|
||||
try {
|
||||
println("sending to $host:$port")
|
||||
bootstrap.attr(AttributeKey.valueOf<String>("url"), request.uri())
|
||||
bootstrap.attr(AttributeKey.valueOf<Int>("uid"), carUid)
|
||||
val ch = bootstrap.connect(host, port).sync().channel()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package car.client
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException
|
||||
import getLocationUrl
|
||||
import io.netty.channel.ChannelHandlerContext
|
||||
import io.netty.channel.SimpleChannelInboundHandler
|
||||
@@ -10,6 +9,7 @@ import objects.Environment
|
||||
import LocationResponse
|
||||
import java.io.ByteArrayInputStream
|
||||
import CodedInputStream
|
||||
import InvalidProtocolBufferException
|
||||
|
||||
/**
|
||||
* Created by user on 7/8/16.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package car.server
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException
|
||||
import connectUrl
|
||||
import io.netty.buffer.Unpooled
|
||||
import io.netty.channel.ChannelFutureListener
|
||||
@@ -16,6 +15,7 @@ import CodedInputStream
|
||||
import CodedOutputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
import RouteDoneRequest
|
||||
import InvalidProtocolBufferException
|
||||
|
||||
/**
|
||||
* Created by user on 7/6/16.
|
||||
|
||||
Reference in New Issue
Block a user