replace google protobuf exception to kotlin exception

This commit is contained in:
MaximZaitsev
2016-07-22 14:59:45 +03:00
parent 5b71ae0692
commit 3860150b50
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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.