-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
We need a parameter annotation which allows log methods to pass additional parameters to the constructor of exceptions. Something like @Param. It would exclude that parameter from the list and instead apply those values to non-cause, non-message parameters of the constructor.
For the purposes of resolution, assume the message parameter is the left-most String and the cause parameter is the left-most Throwable or subtype thereof.
Parameters should be order-matched first, then type-matched to resolve ambiguity, throwing an exception if there is no unambiguous solution. The @Param annotation should allow an optional class name to be specified which would have to match the exact type of the parameter in question, to enable unambiguous resolution in this case.