Class ExceptionHandler
IExceptionHandler 구현체. 예외 심각도에 따라 Warning/Error 분기 후 ILogSystem 출력.
public class ExceptionHandler : IExceptionHandler
- Inheritance
-
objectExceptionHandler
- Implements
Remarks
OperationCanceledException → 정상 취소로 간주, 로그 없음. IOException / UnauthorizedAccessException → Warning. 그 외 모든 예외 → Error. context 문자열은 발생 위치를 나타내며 예외 메시지 앞에 붙어 출력된다.
Constructors
ExceptionHandler(ILogSystem)
public ExceptionHandler(ILogSystem log)
Parameters
logILogSystem
Methods
Handle(Exception, string)
예외를 심각도에 따라 처리(로그 출력).
public void Handle(Exception exception, string context = "")
Parameters
exceptionException처리할 예외.
contextstring오류 발생 위치 또는 추가 설명 (예: "[MySystem] 로드 실패").