1 Answer
1

Not all exceptions have an inner one. Make sure that the provided exception actually has an InnerException. If it doesn't, simply print out the details of the provided exception instead (which you generally should do, the InnerException simply details the error mentioned in the root exception).