Support Board
Date/Time: Tue, 04 Mar 2025 03:51:30 +0000
Post From: Is try/catch supported for custom indicators?
[2021-08-27 01:10:04] |
Dryheat31 - Posts: 13 |
I have searched the support board and found numerous mentions of this issue but the only solution that I see provided is to add -fexcptions to the "Additional Compiler Parameters". However when I add this parameter and select "Remote Build" it still fails and still reports the same message: HT_HIddenDivMACDx2_64.cpp:265:15: error: exception handling disabled, use '-fexceptions' to enable 265 | catch (char *ErrMsg) { | ^~~~~~ HT_HIddenDivMACDx2_64.cpp:266:22: error: 'ErrMsg' was not declared in this scope 266 | sc.AddMessageToLog(ErrMsg, 1); The only way I can get my files to compile without errors is to completely remove all of the try/catch statements from my code. How is the custom study supposed to report run time exceptions to the log if try/catch is not supported? Is there a solution to this or do I simply have to remove the error handling I have built into my custom indicators? FYI, I can compile this using Visual Studio 2017 but many installations of Sierra Chart are not able to run the indicators that are compiled through that program. I'm searching for solutions and so far I have not found a clear explanation in any of the support board posts I have reviewed to date. Seems to be a common issue, yet no one who posts about this issue ever receives a workable solution. Thanks for your time and assistance! |