Catch exceptions in main() only if NDEBUG is defined