make static method

SDKException make({
  1. required ErrorCode code,
  2. required String message,
  3. ErrorCategory category = pb_enum.ErrorCategory.ERROR_CATEGORY_COMPONENT,
  4. Object? underlyingError,
})

Generic factory (mirrors Swift SDKException.make).

category defaults to COMPONENT to match Swift's default. Useful when the specific factories above don't cover the desired (code, category) pair.

Implementation

static SDKException make({
  required pb_enum.ErrorCode code,
  required String message,
  pb_enum.ErrorCategory category =
      pb_enum.ErrorCategory.ERROR_CATEGORY_COMPONENT,
  Object? underlyingError,
}) => _build(
  code: code,
  category: category,
  message: message,
  underlyingError: underlyingError,
);