[ https://issues.apache.org/jira/browse/KAFKA-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias J. Sax resolved KAFKA-39. ---------------------------------- > javaapi does not declare IOException to be thrown > ------------------------------------------------- > > Key: KAFKA-39 > URL: https://issues.apache.org/jira/browse/KAFKA-39 > Project: Kafka > Issue Type: Bug > Priority: Minor > > javac it upset that IOException is not in the method signature of the > javaapi. This forces un-idiomatic try/catch blocks like: > {noformat} > } catch (Exception e) { > if (e instanceof IOException) { > logger.error("error communicating with broker: " + e); > } else { > logger.error("unexpected exception: ", e); > } > } > {noformat} > They clearly can be generated (from SimpleComsumer:fetch: > {noformat} > case ioe: java.io.IOException => channel = null; throw ioe; > {noformat} > I wasn't sure how to get a "proper" method signature with the java/scale > checked exception mismatch. -- This message was sent by Atlassian Jira (v8.3.4#803005)