Completed
Details
Assignee
Stuart HallowayStuart HallowayReporter
Stuart HallowayStuart HallowayApproval
OkPatch
Code and TestPriority
MinorFix versions
Details
Details
Assignee
Stuart Halloway
Stuart HallowayReporter
Stuart Halloway
Stuart HallowayApproval
Ok
Patch
Code and Test
Priority
Fix versions
Created January 28, 2011 at 7:59 PM
Updated July 26, 2013 at 4:35 PM
Resolved July 26, 2013 at 4:35 PM
Problem: need to convey diagnostic information in an exception, and Java exceptions are poor for this because they don't have any place to put data. Having many apps write their own exceptions is unnecessary code bloat, and sometimes has compilation implications.
Choices made:
Naming it
ExceptionInfo
. Needs to tell the user that it carries data, without suggesting that there was a problem with data.think we have to include Exception in the name, esp. for interop consumers.
Class of data member. IPersistentMap
Class of map input. IPersistentMap
Do not want to build anything to support conditional logic. (Use bindings for this).
Base class. RuntimeException is consistent with a dynamic language (don't want to impose checked exceptions).
print with data just after msg on first line
equality by identity (pretty much dictated by having exception as base class)
ex-info factory function
ex-data fn to get the data out
data and msg arguments required
data argument comes second
matches Java expectation of msg first, cause last
matches print order