# API Change to Timeout?

**URL:** <https://www.ruby-forum.com/t/api-change-to-timeout/174068>\
**Category:** Ruby\
**Created:** [August 20, 2009, 10:21am UTC](https://www.ruby-forum.com/t/api-change-to-timeout/174068 "2009-08-20T10:21:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Eppstein](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Chris\_Eppstein](https://www.ruby-forum.com/u/Chris_Eppstein)\
**Post date:** [August 20, 2009, 10:21am UTC](https://www.ruby-forum.com/t/api-change-to-timeout/174068/1 "2009-08-20T10:21:12Z")

</div>

This commit:

> <https://github.com/FooBarWidget/rubyenterpriseedition/commit/00a8c1b356b482b2b34931344e747062a8d07795>
>
> \* lib/timeout.rb (Timeout::timeout): made sensitive to location on the
> stack.… \[ruby-core:15458\]
> 
> 
> git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby\_1\_8\_6@17158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Breaks the documented API of the timeout function by changing the  
default exception class raised from Timeout::Error to  
Timeout::ExitException.

I spent a fair bit of time diagnosing this issue today as it was  
causing misbehavior in memcache-client. As a work-around, I am using a  
modified version of memcache-client that specifies Timeout::Error as  
the timeout  
exception class explicitly, but it would be great to fix this as I’m  
sure lots of libraries expect Timeout::Error.

Thanks,  
Chris Eppstein

P.S. I originally reported this issue to the Phusion guys, but they  
directed me here.

---

<div class="post-metadata">

**Author:** ![Chris\_Eppstein](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Chris\_Eppstein](https://www.ruby-forum.com/u/Chris_Eppstein)\
**Post date:** [August 20, 2009, 10:41am UTC](https://www.ruby-forum.com/t/api-change-to-timeout/174068/2 "2009-08-20T10:41:07Z")

</div>

Nevermind, I’m tired and didn’t fully understand that change when I  
first read it. I see that the Error class is re-raised later and so  
the API didn’t change. Sorry to jump to conclusions…

chris
