0

Does anybody know how to catch all exceptions in monomac?

On windows .net I wrap the run loop in a try{}catch and also use:

Application.ThreadException + AppDomain.CurrentDomain.UnhandledException

It would nice to be able to get crash reports from my new mac software I'm beta testing.

Gordon Truslove
  • 724
  • 2
  • 10
  • 19
  • Yes, that's the way it is done. What is the question? – Hans Passant Dec 05 '12 at 17:24
  • How do I do this in monomac? None of these methods catch unhandled exceptions. I'm using NSApplication, AppDomain.CurrentDomain.UnhandledException does nothing and wrapping the run loop never catches anything. – Gordon Truslove Dec 06 '12 at 09:03
  • 1
    @GordonTruslove The approach described works for me. Post your code. – TheNextman Dec 07 '12 at 15:20
  • I've gone through and wrapped drawrect in a try{}catch{} block, also and new threads and new timers and I think I'm catching all errors now. My app just would quit if there was an exception. – Gordon Truslove Dec 08 '12 at 15:53
  • `AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;` works for me. – Bojan Komazec Mar 25 '14 at 18:01

0 Answers0