From 2ef9dab9d009d7de0b0e52b0e26d9c0a35fce6f0 Mon Sep 17 00:00:00 2001
From: robekras <robert.kraske@weihenstephan.org>
Date: Thu, 27 Dec 2012 18:18:50 +0100
Subject: [PATCH 1/1] 1) Fixed issue #779: PHPEclipse reports error with a correct try/catch block

Signed-off-by: robekras <robert.kraske@weihenstephan.org>
---
 .../phpdt/internal/compiler/parser/Parser.java     |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java
index caa1d10..37aed9d 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java
@@ -1066,11 +1066,17 @@ public class Parser implements ITerminalSymbols, CompilerModifiers,
 				if (token != TokenName.LBRACE) {
 					throwSyntaxError("'{' expected in 'try' statement.");
 				}
+				
 				getNextToken();
-				statementList();
-				if (token != TokenName.RBRACE) {
-					throwSyntaxError("'}' expected in 'try' statement.");
+				
+				if (token != TokenName.RBRACE) {		// Process the statement only if there is (possibly) a statement
+					statementList ();
+				
+  					if (token != TokenName.RBRACE) {
+  						throwSyntaxError("'}' expected in 'try' statement.");
+  					}
 				}
+				
 				getNextToken();
 				return statement;
 
-- 
1.7.1