You learned the basics of developing applications with Apache Thrift. Now it's time to tackle a more advanced, though important topic: handling application errors in general, and, more specifically, in the Apache Thrift environment.
It is highly unlikely that your application, service, or any other piece of software will be error-free. No matter how much time you spend debugging, testing, and fixing your software, some bugs will slip into the final product. If you look at most software products these days, they all have bugs, even those from major companies hiring thousands of developers and testers.
Errors may be caused not only by the malfunction of an application, but also due to wrong data, connection problems, or invalid operations. You develop services that consume data that's provided from the outside—external libraries or applications. This data may be invalid and your service may be unable to process it. Consider a simple example where the...