I’m working with the Apache Thrift tool and i’m throwing some Exceptions from the server side to the client side.
The only problem is that when the client is calling a method returning a boolean Thrift is ignoring the Exception and the server is sending back the value of the boolean:
So i was wondering if it’s possible after calling the method to check if an exception has been thrown since my try/catch block is not doing it.
To solve my problem I used something not very clean but it does the trick:
I defined a new struct in Thrift acting like a wrapper for the boolean value:
Now my client receives all the exception and instead of doing
I’m doing:
Edit: It seems that the 0.9 version of Thrift fixes the issue.