From: Clark Snowdall Date: 2006-07-29T05:44:33+09:00 Subject: Custom Exception classes Hello, I'm new here so please be gentle (i.e. if I'm posting in the wrong place let me know). At any rate the team I'm working on is cooking up a ruby app and we want to implement some error handling by using a custom exception class inheriting from Exception. The most important thing we want is to be able to pass an Exception object to one of our custom exception objects rather than just a message string and have it keep that object for the duration. The plan is to chain these exceptions together as each raised exception will keep a reference to its parent exception (similar to C++ and Java implementations). The problem is our exception instances seem to be disappearing from one rescue to the next. Our best guess is that since each exception is stored in a global variable, its getting overwritten. But we're still testing. If anyone has any ideas or better yet custom exception implmentations that will allow objects to persist in excptions, that would be great. Clark -- Posted via http://www.ruby-forum.com/.