the Symfony Debug component already has some nice candy like showing the php code surrounding the trace steps of an exception.(at least I think this also comes from it)
It is widely used and powers for example the Silex and Laravel Error Pages and is also used by the Drupal Console Package