brooklyncentral/brooklyn — pull request #814 by sjcorbett (2013-07-08 13:49:40+00:00)
Title: Rest errors

* Adds `ClassCoercionException`, thrown by methods in `TypeCoercions`. DefaultExceptionMapper in rest project catches these rather than all ClassCastExceptions.
* Extends and improves the `ApiError` class with optional 'details' field.
* Throwables can be turned into ApiErrors with message the exception message (or class name if message is null) and details the exception stack trace.