B4R Question Try Catch End Try error

atiaust

Active Member
Licensed User
Longtime User
Hi All,

When I try to use a Try, Catch, End Try I get the following error message when I try to run the program:

Using previously compiled file: D:\B4R\rOBS-MQTT-RS232-Ozone\Objects\bin\sketch\rSoftwareSerial.cpp.o
D:\B4R\rOBS-MQTT-RS232-Ozone\Objects\bin\sketch\b4r_main.cpp: In static member function 'static void b4r_main::_astream1_newdata(B4R::Array*)':
b4r_main.cpp:249:15: error: expected type-specifier before 'Exception'
catch (Exception e26) {
^
b4r_main.cpp:249:15: error: exception handling disabled, use -fexceptions to enable
b4r_main.cpp:249:25: error: expected ')' before 'e26'
catch (Exception e26) {
^
b4r_main.cpp:249:25: error: expected '{' before 'e26'
b4r_main.cpp:249:25: error: 'e26' was not declared in this scope
b4r_main.cpp:249:28: error: expected ';' before ')' token
catch (Exception e26) {
^
b4r_main.cpp:448:1: error: expected '}' at end of input
}
^
Using library SoftwareSerial at version 5.0.4 in folder: C:\Users\atiau\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SoftwareSerial
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\atiau\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
exit status 1

Can someone please let me know if it possible to use in B4R and if so how to get this to work.

Thanks
 
Top