# Exception backtraces for view plugins

**URL:** <https://www.ruby-forum.com/t/exception-backtraces-for-view-plugins/91807>\
**Category:** Rails\
**Created:** [April 12, 2007, 3:18pm UTC](https://www.ruby-forum.com/t/exception-backtraces-for-view-plugins/91807 "2007-04-12T15:18:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rebecca\_Blyth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d26b3c/32.png) [@Rebecca\_Blyth](https://www.ruby-forum.com/u/Rebecca_Blyth)\
**Post date:** [April 12, 2007, 3:18pm UTC](https://www.ruby-forum.com/t/exception-backtraces-for-view-plugins/91807/1 "2007-04-12T15:18:28Z")

</div>

I’m using a plugin that adds a new templating system to my app. The  
backtrace for errors in the standard rhtml templates includes the  
template’s file name and the line number where the error occurred.  
Errors in templates using the new templating system don’t produce  
this.

.rhtml template errors look like this:  
#{RAILS\_ROOT}/app/views/reservation/list.rhtml:25:in  
`\_run\_rhtml\_reservation\_list’  
…

and my plugin template errors look like this:  
(erb):48:in `render’  
…

I’ve found that the stated line number is correct - once you’ve worked  
out exactly which template you need to look at. It’s OK if the action  
only uses one template, but if you’re using partials things start to  
get a bit tricky.

It’d be useful to be able to get the file name of the template causing  
the problem into the backtrace. Does anyone know how it works in the  
rails code and/or how to make it work in a plugin? I’ve had a look at  
the rails code, but got lost along the way…

Ta,  
Rebecca
