From: Ezra Zygmuntowicz Date: 2005-10-04T01:24:24+09:00 Subject: Re: raising exceptions across DRb and XMLRPC This is how I am using the XMLRPC::FaultException: class BlogAPIFault < StandardError end def mt_getCategoryList(blogid) result = @client.call('mt.getCategoryList', blogid, @username, @password) rescue XMLRPC::FaultException raise BlogAPIFault.new($!.faultString) end This prints nice errors to stdout. HTH- -Ezra On Oct 3, 2005, at 6:22 AM, Adam Keys wrote: > On Sep 27, 2005, at 10:07 PM, Joe Van Dyk wrote: > >> Hm, now all I have to do is figure out how to send a >> XMLRPC::FaultException. Anyone have any example code? >> >> > > IIRC, just raise it like any old exception > > def my_xmlrpc_method > raise XMLRPC::FaultException.new(1, 'You got exception') > end > > The first parameter is the fault code you want to send, the second > is the fault string. > > HTH, > -- > ~akk > http://therealadam.com > > -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com