GrahamS
November 11, 2015, 3:18pm
1
Hi,
So I have trawled the forum and there is little or no mention of exception handling.
If I add a try {} catch {} to my code I just get told to use -fexceptions, others have suggested it is not available ???.
So - if that is true - what is the recommended way of handling potential failures on a photon…
Sorry if this is a basic question - my recent background is C# - which is big on exception handling ;-).
NB I prefer to use CLI and/or Dev for compiling…
Thanks
Graham
1 Like
Madoo
August 17, 2016, 1:15am
2
I’m curious too. Please let us know if you find out.
Cheers!
I also am interested in this. I want to use the Catch or Doctest testing libraries. In order to get these libraries to work fexceptions needs to be able to be turned on. I don't have plans on including fexceptions in actual firmware builds but I'd like to be able to build my code with fexceptions turned on so I can at least run the testing library. How can I accomplish this with at least the cloud-ide?
Be nice if someone addressed this as I do see other related threads:
I have been working on a project which involves sending HTTP request. I want to add Exception handling when the HTTP request fails. How do I go about adding it? I tried adding try{}catch(){}, but getting an error saying exception handling disabled, please use -fexceptions to enable
Any help on the same will be appreciated.
Is there any way to set compile time options in the cloud? For example, there are a couple cases where I would like my core to throw an exception, but when I compile I get:
exception handling disabled, use -fexceptions to enable
This is not the first time this has come up and I’ve worked around it. I really like using the Cloud IDE so that I can work on it when I’m supposed to be working, but I’d like to be able to do some more complicated things in it. I’d also like to have the option to swit…
did you find a way to enable it?