Based on the Connector discussion earlier this week, Identigral twittered a question about exceptions:

"... How do devs respond to interface not allowing checked exceptions to be thrown?"

Our Lead developer on Identity Connectors had the following response:

"All interfaces are expected to throw runtime exceptions.   While not explicitly declared for each operation (which would be syntactically redundant in Java),  all applications must be prepared for exceptions.   The framework already knows to expect exceptions from SPI calls.

Connector developers are allowed to throw any RuntimeException, but are encouraged to throw those already defined in org.identityconnectors.framework.common.exceptions.   There are also some operations which declare in the javadoc when a specific RuntimeException is expected.

There is ongoing debate over the merits of checked vs unchecked exceptions.  While many developers are used to the assistance that declaring exceptions give the developer, it often results in the swallowing of exceptions, or unnecessary extra coding."
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by Craig McDonald