# Determining is a Partial is Rendering

**URL:** <https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857>\
**Category:** Rails\
**Created:** [April 15, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857 "2008-04-15T18:14:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew4ta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@andrew4ta](https://www.ruby-forum.com/u/andrew4ta)\
**Post date:** [April 15, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857/1 "2008-04-15T18:14:29Z")

</div>

Is there a way to determine if the current render cycle is for a  
partial?

I have an exception handler setup, but I’d like to re-throw the  
exception if it is thrown while rendering a partial.

Thanks for any advice,  
Andrew

---

<div class="post-metadata">

**Author:** ![andrew4ta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@andrew4ta](https://www.ruby-forum.com/u/andrew4ta)\
**Post date:** [April 16, 2008, 6:48am UTC](https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857/2 "2008-04-16T06:48:50Z")

</div>

You could check out thread.backtrace and maybe parse it.

andrew4ta wrote:

> Is there a way to determine if the current render cycle is for a  
> partial?
> 
> I have an exception handler setup, but I’d like to re-throw the  
> exception if it is thrown while rendering a partial.
> 
> Thanks for any advice,  
> Andrew
