• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to properly read a thrown exception error?  RSS feed

 
Mark Richardson
Ranch Hand
Posts: 108
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please consider this exception error that my application has thrown:



I'm not quite sure where to begin. Do I start at the first line and look at line #29 of SurveyCompareAssetsCheck? I know that I didn't make any changes on ReportView, and obviously didn't change anything on Thread, since that is a system related class.

My question really is... what is the best practice or rule of thumb for reading these types of exception errors?
My second question is, what exactly is a "cannot be cast to" situation?
 
Dave Tolls
Ranch Foreman
Posts: 3068
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While bearing the error in mind, work your way down the stack trace until you find the first class that's one of yours.
Then look at what that code there is doing, and try and figure out how the error relates.

in this case there is going to be a cast to SurveyCompareAssetsCheckData...however the value it is casting is not of that class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!