-2

I am working on data feeding console application. It feeds the xml files (data in form of xml file) from a directory to a portfolio application. It processes files one by one in for loop depends on file count.

When I run the exe of this application sometimes it suddenly stops in between because of some unknown error. Though, I have used logging mechanism and error handling. What should I do so that it should not crash (stop) in between until all the files have been processed.

nitendra jain
  • 433
  • 4
  • 8
  • 16

1 Answers1

1

I think there is an unknown exception thrown that is not caught. You could try to add a global exception handler (via this SO answer) and log that exception. But that could still lead to your program stopping but at least you catch all the exceptions so you can debug better.

Community
  • 1
  • 1
SynerCoder
  • 12,493
  • 4
  • 47
  • 78