gnucash/libgnucash
John Ralls 4746054635 Partial fix to exception crashes on Windows.
There seems to be more than one problem that causes the exception handler ("catch") to
get lost on Windows:
* Throwing from a constructor called from a member function of another object of the same
class. That's fixed here for the GncNumeric string constructor, but there's at least one other
instance I'm still working on in GncNumeric::to_decimal.
* Hidden memory allocation in a stack-allocated object like std::string, std::istringstream,
or boost::smatch: The throw causes the object to go out of scope which calls its destructor
and in that case the catch reference is either lost or never compiled in.

This change ifdefs out the creation of detailed exception messages on Windows to avoid
the destruction of the std::istringstream and its attached std::string, creates a series of
helper functions to ensure that the boost::smatch is in a non-throwing scope, and puts the
computed values directly into the member variables instead of delegating the construction
to a temporary and then copying out the values. The last item is more correct anyway, as
C++ constructor delegation is supposed to happen in the member initialization part rather
than the function body.
With these changes the exceptions from the GncNumeric string constructor are handled
correctly.
2017-10-26 11:33:50 -07:00
..
app-utils Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
backend Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
core-utils Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
doc Fix disabling src docs build on Windows 2017-10-26 14:05:17 +02:00
engine Partial fix to exception crashes on Windows. 2017-10-26 11:33:50 -07:00
gnc-module Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
quotes Restructure the src directory 2017-08-10 18:45:00 +02:00
scm Restructure the src directory 2017-08-10 18:45:00 +02:00
tax Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
CMakeLists.txt Move accounts, checks and pixmaps into a data directory 2017-08-11 22:42:15 +02:00
Makefile.am Move accounts, checks and pixmaps into a data directory 2017-08-11 22:42:15 +02:00