Better context information handling for exceptions.
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 31 Aug 2012 18:39:17 +0000 (21:39 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Fri, 7 Sep 2012 09:34:31 +0000 (12:34 +0300)
commit9cc0d166a9d6b6e6dc8242a21f8363fe7360a89e
treeae3411944d06a94794adf9778014c71beb1a7c5f
parent8ae8e1a3fdade041152cea63d28e15f38fda6524
Better context information handling for exceptions.

- GromacsException now has a prependContext() method that can be used in
  a catch block to add additional context information to the exception
  before rethrowing it.
- It is possible to nest exceptions instead of embedding all information
  into the exception message string.

Information added by these new methods is currently not easily
accessible outside the exception implementation, but it is not needed
either.  Such access can be implemented once it is more clear what are
the requirements.

Closes #985.

Change-Id: I2b9ed1d11ee3cb36cc7da927cf6730c6f8c353b2
src/gromacs/commandline/cmdlineparser.cpp
src/gromacs/options/options.cpp
src/gromacs/utility/exceptions.cpp
src/gromacs/utility/exceptions.h