카테고리 없음

[.그물] XP와 Vista에서 다른 예외 처리

행복을전해요 2021. 1. 9. 03:25

AppDomain.CurrentDomain.UnhandledException대신 이벤트를 구독 할 수 있습니다. 애플리케이션이 예외를 처리하지 않으면 항상 발생합니다.

Btw, Application.Run () 문을 둘러싼 try-catch는 내가 아는 한 나쁜 습관으로 간주됩니다.

-------------------

아마도 UnhandledExceptionModeVista에서 다른 기본값이 있습니까? 이 설정을 사용해 보셨습니까? 다음을 호출하여 명시 적으로 모드를 강제 할 수 있습니다.

// Set the unhandled exception mode to force all Windows Forms errors to go 
// through our handler.
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);


출처
https://stackoverflow.com/questions/2005964