From: "Todd A. Jacobs" Date: 2007-06-13T15:03:58+09:00 Subject: How to access response code with mechanize I have a code segment which is intended to catch ResponseCodeError exceptions from the mechanize library: begin # code rescue ResponseCodeError puts 'bad response code: ' + $! end This doesn't quite do what I need. What I really want is to display the actual response code that mechanize is unhappy about, rather than just a stack trace. According to the docs, WWW::Mechanize::ResponseCodeError has an attribute named response_code, but I'm not sure I understand how I access that within the exception handler. -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks"