Treat exceptions better in interactive selections.
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 2 May 2013 17:55:42 +0000 (20:55 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 9 Aug 2013 17:57:13 +0000 (19:57 +0200)
commit6aeb717c6a7a8d882497a5cafe95a51a5946660d
tree0249c94910d9902dc2f9e0fa588c14519fc47b42
parent54903092fe7d3b9dc88ab214d3e4d87f7efd9f18
Treat exceptions better in interactive selections.

If a user input error occurs in an interactive selection parser, the
message is now printed and parsing continues, like it used to work
before exceptions were introduced here.  Although most code still does
not use exceptions for user error reporting, this makes the code more
future-proof (and a subsequent commit will add some exceptions that take
advantage of this).

Refactored exception message formatting to support this, removing a TODO
related to duplicated code in the process.

Related to #655 and #838.

Change-Id: I4ba23c6dd1005f61d50515e6857a5dc23fc1768a
src/gromacs/selection/parsetree.cpp
src/gromacs/utility/exceptions.cpp
src/gromacs/utility/exceptions.h
src/testutils/testasserts.h