It is not working in my case.
I have C/C++ extension version 1.6.0
Platformio.ini:
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
lib_deps =
knolleary/PubSubClient@^2.8
m5ez/ezTime@^0.8.3
ropg/ezTime@^0.8.3
adafruit/Adafruit BMP280 Library@^2.4.2
adafruit/Adafruit MCP3008@^1.3.1
build_unflags =
-fno-exceptions
build_flags = -D UPLOAD_SPEED=${upload_settings.upload_speed}
-D MONITOR_SPEED=${upload_settings.monitor_speed}
-std=c++11
-fexceptions
extends = upload_settings
try …catch block:
try
{
Serial.println(" checking _bmpInited");
if(_bmpInited != _NULL)
Serial.printf(“_bmpInited %d \n”, _bmpInited);
}
catch (const std::exception& e)
{
Serial.printf(“Attempted read _bmpInited %s \n”, e.what());
}
catch (…)
{
Serial.println(“attempt at _bmpInited:Exception for unknown reason”);
}
platformio-build.py fragment:
Exceptions
if “PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS” in flatten_cppdefines:
env.Append(
CXXFLAGS=[“-fexceptions”],
LIBS=[“stdc+±exc”]
)
else:
env.Append(
CXXFLAGS=[“-fno-exceptions”],
LIBS=[“stdc++”]
)
and still, I observe this:
3ffff3a0: feefeffe feefeffe feefeffe feefeffe
3ffff3b���In BMP280Temperature constructor
checking _bmpInited
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (28):
epc1=0x40204040 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
stack>>>
ctx: sys
sp: 3fffe870 end: 3fffffb0 offset: 0190
3fffea00: 3ffee3bc 3ffee994 3ffeeac8 4020403e
3fffea10: 00000000 000e000f 00000000 402088a3