Condense exception messages accumulated through recursion [SPR-3708] #8389
Spring currently generates exception traces which have text whose size will grow with the square of the bean fetch depth at which they occur - that is, since the "cause" exception message is printed out in full each time, each message includes the text at the next stack level which is a duplicate, and can become very hard to read. For example here is a message occuring at fetch depth 10:
In general the useful material is i) the message accumulated at the LEAST derived stack frame, and ii) the trace generated at the MOST derived stack frame.
The following SVN link to "UniversalRuntimeException" shows a possible implementation strategy and usage style for an Exception which produces more condensed messages, with only a single Exception object for a stack. Some of this code is devoted to conversion and unwrapping of checked exceptions and so is not directly relevant to this use case.
1 votes, 5 watchers
The text was updated successfully, but these errors were encountered: