Could someone please tell me why the catch statement below fails to catch the exception when the stock symbol is not found in the GICS dictionary? I just don't see the problem.
CODE:
Please log in to see this code.
Please note this is embedded in larger code inside a DLL definition ... if that matters.
What I do get out of my DLL is:
System.ThrowHelper.ThrowKeyNotFoundException()Does that prevent the generic catch statement from working? If so, how do I catch that?
Size:
Color:
It's not clear to me from the information given how ThrowHelper is being invoked. If required, set up your IDE to break on the error in order to trace it.
Size:
Color:
I found the problem. There's nothing wrong with the code above, and my DLL library wasn't the area causing the problem. I was looking in the wrong place.
Typically I don't perform error handling in the Main Strategy code, but I include a
CODE:
Please log in to see this code.
statement in the Strategy, and when the Strategy hit a stock that wasn't in the GICS dictionary, it threw an unhandled error.
----
There are a few problems is the GICS dictionary (such as stocks unknown to it), but I guess that's a new subject (and post). Thanks for the help.
Size:
Color: