When debugging a complex Clojure project with SLIME, I would often find myself chasing chains of exceptions as much as 20 levels deep to get to the true cause of a problem. I finally tired of the “11111111111”-look-“0000000000” exercise, especially since in my experience the most useful stack traces are almost always the innermost ones.
Thus, I decided to modify swank-clojure to present exceptions in the opposite order: rather than starting with the caught exception and providing the option to examine its “Cause”, start with the innermost cause and allow examining its “Source”. In addition to providing the must useful stack traces up front, this also means that the first thing you see in the SLDB window is the real exception, not a mess of RuntimeExceptions.
For the interested, I posted the change on GitHub; it’s my first real change to anything SLIME, so take care if you decide to use it.
Comments