From f07d48e812e5761239c9d34cae35e52e15d1a99e Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Fri, 1 Feb 2008 01:36:26 +0000 Subject: [PATCH] Fix to the throws clause validation Summary: Types from external files are not resolved until the program parse pass, not the include one. Therefore, only do full type validation once after all includes have been parsed and external type pointers resolved. Reviewed By: aditya Test Plan: build ServiceManager.thrift git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665452 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/thrifty.yy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy index 0b873866..ffdb2f80 100644 --- a/compiler/cpp/src/thrifty.yy +++ b/compiler/cpp/src/thrifty.yy @@ -766,7 +766,7 @@ Throws: { pdebug("Throws -> tok_throws ( FieldList )"); $$ = $3; - if (!validate_throws($$)) { + if (g_parse_mode == PROGRAM && !validate_throws($$)) { yyerror("Throws clause may not contain non-exception types"); exit(1); } -- 2.17.1