[anjuta] language-support-cpp-java: Make cxxparser more robust
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] language-support-cpp-java: Make cxxparser more robust
- Date: Wed, 5 Jan 2011 22:45:26 +0000 (UTC)
commit 27d4be39d7e1b73275bfa7bf1bbc43ae7fba9438
Author: Johannes Schmid <jhs gnome org>
Date: Wed Jan 5 23:44:54 2011 +0100
language-support-cpp-java: Make cxxparser more robust
Catch all std exceptions and print warnings
.../cxxparser/engine-parser.cpp | 21 +++++++++++++------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
index 8cd4d94..6b40a83 100644
--- a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
+++ b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
@@ -823,11 +823,18 @@ IAnjutaIterable *
engine_parser_process_expression (const gchar *stmt, const gchar * above_text,
const gchar * full_file_path, gulong linenum)
{
- IAnjutaIterable *iter =
- EngineParser::getInstance ()->processExpression (stmt,
- above_text,
- full_file_path,
- linenum);
-
- return iter;
+ try
+ {
+ IAnjutaIterable *iter =
+ EngineParser::getInstance ()->processExpression (stmt,
+ above_text,
+ full_file_path,
+ linenum);
+ return iter;
+ }
+ catch (const std::exception& error)
+ {
+ g_critical ("cxxparser error: %s", error.what());
+ return NULL;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]