On Mar 10, 11:04 am, Francis Glassborow
<francis.glassbo...@btinternet.com> wrote:
On 10/03/2011 00:44, Andrew wrote:
I wish exceptions would give you access to the stack trace like
they do in Java. With all the changes happening in C++ I am
disappointed that there have been no developments here. Does
no-one else think this would be a good thing? I suppose some
C++ers would be worried about the runtime and memory consumption
costs. Any comments?
I cannot see any reason that an implementation should not provide
you with that information. OTOH I cannot see any reason that the
C++ Standard should make it a requirement.
I can. Without the official way that is blessed by the std, there
will be multiple implementations with different APIs. For such a
commonly recurring task this would be sub-optimal. I reckon that's
why java provides stack tracing. Without it wone would have to go
native with platform-specific code behind the native
implementation. Also, each attempt by different people/groups would
lead to a different API. Java also provides many other things that
standardize interface for operations that are platform-specific or
otherwise non-trivial to implement.
The difference is that Java only runs on a single platform, the JVM.
stack, or that the hardware must support one. Then how could it
[ comp.lang.c++.moderated. First time posters: Do this! ]