2

Suppose I have a bit of a particular exception message generated by the framework while running in standard English-US culture, e.g. "This failure occured while attempting to connect to the Principle server." How can I figure out which code in the framework generates an exception containing this text in the message?

The stack trace does not always help, because the framework code often uses several levels of helper methods to generate the exception before finally throwing it.

I would imagine that the string is localized, which is why I can't find it within any constants in ILSpy. I suppose the string would be stored with a unique resource ID or something to that effect, and then referenced by that ID, but I'm not sure where to start in finding the ID...

Jordan Rieger
  • 3,025
  • 3
  • 30
  • 50
  • you should narrow it down to a particular dll. post the stack trace with the exception that was thrown. – eran otzap Jun 11 '15 at 20:09
  • 1
    @eranotzap I know from the stack trace which method in the framework *threw* the exception. But the framework code often uses several levels of helper methods to *generate* the exception/messages before finally throwing it. The stack trace can't pinpoint those. So I would like to be able to work backward from the message itself to find all the places it is referenced in the framework. I'm sure this must be possible, and I want to avoid posting my particular stack trace, because this question is more about the general procedure for finding any message string in the framework. – Jordan Rieger Jun 11 '15 at 20:14

0 Answers0