# Pretty backtrace?

**URL:** <https://www.ruby-forum.com/t/pretty-backtrace/126383>\
**Category:** Rails\
**Created:** [January 17, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/pretty-backtrace/126383 "2008-01-17T21:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [January 17, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/pretty-backtrace/126383/1 "2008-01-17T21:57:53Z")

</div>

I know I can print my own backtrace for an exception with  
exception.backtrace.join("\n")

But when an uncaught exception goes all the way up to Rails handler,  
Rails prints out a nice prettified stacktrace that’s a bit better than  
this. It is shortened and abbreviated.

Is there any way I can call a method somewhere to use Rails’s same logic  
to shorten and prettify my own stacktrace in the same way before I print  
it out myself?
