All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.finagle.thrift.transport.ExceptionFactory.scala Maven / Gradle / Ivy

There is a newer version: 24.2.0
Show newest version
package com.twitter.finagle.thrift.transport

/**
 * Helper functions for keeping exception messages consistent
 */
private[transport] object ExceptionFactory {
  def wrongServerWriteType(value: Any): Exception = {
    val msg = s"Expected an `Array[Byte]` but received ${value.getClass.getSimpleName}"
    new IllegalArgumentException(msg)
  }

  def wrongClientWriteType(value: Any): Exception = {
    val msg = s"Expected a ThriftClientRequest but received ${value.getClass.getSimpleName}"
    new IllegalArgumentException(msg)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy