Fraser 1 Posted July 31 If I have an object with static storage duration that throws an exception while constructing it is not caught by the expected catch statement. Instead there is an external exception EEFACE and 'Abnormal program termination' is reported. This only happens with a VCL application. The code would work otherwise. I have to have my object declared static in a function that returns it by reference in order that its construction will be delayed until after something clearly VCL related. This must be something that is known about. I am not providing example code because the requirements for this are described adequately. BTW this is not the undeterminable order of construction of objects of static storage duration problem. Share this post Link to post
Fr0sT.Brutal 655 Posted August 1 What the 19 hours ago, Fraser said: static storage duration is? Share this post Link to post
Fraser 1 Posted August 2 An object is declared in a cpp file at namespace scope. Share this post Link to post
Remy Lebeau 801 Posted August 2 15 minutes ago, Fraser said: An object is declared in a cpp file at namespace scope. That is not what you described originally: Quote I have to have my object declared static in a function Two different things. So, which one are you actually working with? Can you provide a code example that is crashing for you? Share this post Link to post
Fraser 1 Posted Friday at 06:09 PM What appears to be required is a VCL project with an object declared at global scope that throws during construction and an appropriate catch statement in the constructor that will not catch the exception. Share this post Link to post
Fraser 1 Posted Friday at 06:23 PM I've tried that and the bug has not materialised. Probably it requires a large project to appear. Share this post Link to post
Remy Lebeau 801 Posted Friday at 06:53 PM 44 minutes ago, Fraser said: What appears to be required is a VCL project with an object declared at global scope that throws during construction and an appropriate catch statement in the constructor that will not catch the exception. Without an example showing the error in action, it is hard to diagnose this. Share this post Link to post
Fraser 1 Posted yesterday at 10:43 AM Are there any open source projects for C++ Builder that could be used for this kind of problem? Share this post Link to post