On Tue, Jan 20, 2009 at 10:24 PM, Mark Slee <[email protected]> wrote:
> Can you paste your code that raises the exception?
The thrift file:
exception NotValidException {
string why
}
service TestService {
bool isValid( 1:string text ) throws ( 1:NotValidException e )
}
the python server class:
class TestServiceHandler:
def isValid(self, text):
raise NotValidException, "because it isn't"
return False
the python client:
try:
try:
client.isValid("test")
catch NotValidException, e
print e.why
except Thrift.TException, tx:
print 'Error: %s' % (tx.message)
I've tried calling the exception attribute "message", I've tried
various variations on the theme laid out above, but when the exception
gets properly caught by either of the except blocks the message
returned is None.
> Is this an exception being thrown across an RPC call at the application level?
I'm not sure I understand the question, but you will hopefully see
from above what I'm trying to do.
--
Phillip B Oldham
[email protected]
+44 (0) 7525 01 09 01