Community
Participate
Working Groups
when not one, but many "catch" statements follow a single "try" statement, indexer creates warnings. example: catch (Exception except) { result.error(except.what()); m_pReport->addResult(result); } catch (std::exception except) { result.error(except.what()); m_pReport->addResult(result); } catch (...) { result.error("Unexpected error!"); m_pReport->addResult(result); } The indexer generates a warning for the second and third catch statements. Ti looks like this: C/C++ Indexer Problem: Syntax error encountered ... (file, line) I don't think that's right.
The problem is not so much with multiple catch statements, I had no problems catching exceptions using simple empty classes I declared. The problem here is that there was a problem parsing the std::exception class which causes a problem on that catch, and also seems to leave us in a bad state that flags all following catches as problems too.
I was a little premature with my earlier comment, we are successfully parsing std::exception. So assuming your inclusions are right, I'm not sure what would have caused the initial problem and there is not enough information here to do anything about that. I have submitted a fix to the HEAD for better error handling that allows the parser to recover properly and parse the remainder of the catch blocks. This fix will be propagated to the 2.0.1 branch at a later date with the rest of the parser fixes. you can reopen the bug if you have more information about the first problem
fix is now in 2.0.1