Validate that throws clauses in Thrift contain only exceptions
authorMark Slee <mcslee@apache.org>
Thu, 31 Jan 2008 01:49:16 +0000 (01:49 +0000)
committerMark Slee <mcslee@apache.org>
Thu, 31 Jan 2008 01:49:16 +0000 (01:49 +0000)
commit91f2b7b2f71dc67bc90f5eed0de99dbb9317d793
treefaf2f051dab8bfda2a8601bee1034344226ace78
parent8d4b1cc3ab706c8116e279782a1773f5b011860a
Validate that throws clauses in Thrift contain only exceptions

Summary: Throwing non-exceptions, though allowed in some languages, is a weird concept and causes problems in many places. Disallow it in the Thrift compiler and throw an informative error.

Reviewed By: dreiss

Test Plan: Generate a file with an int or something in a throws clause. Peep the nice informative compiler error.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665450 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/main.cc
compiler/cpp/src/main.h
compiler/cpp/src/thrifty.yy