toCheckedException method

CheckedException<T> toCheckedException( {
  1. required String prefix,
  2. ({String english, String? locale}) message = (english: '', locale: ''),
})

현재 데이터를 원인(value)으로 하는 CheckedException을 생성합니다.

비즈니스 로직 중 '예상 가능한' 실패 지점에서 호출합니다. prefix는 에러의 범주(예: 'Auth', 'Validation'), message는 상세 설명을 전달합니다.

Creates a CheckedException]using the current data as the cause (value). Call this at 'predictable' failure points within business logic.

Implementation

CheckedException<T> toCheckedException({
  required String prefix,
  ({String english, String? locale}) message = (english: '', locale: ''),
}) {
  return GenericCheckedException<T>(value: this, prefix: prefix, message: message);
}