Open scolsen opened 8 months ago
Once case where this might be used is in converter logic; converters could return Result
rather than an exception so that there are compile-checks to ensure coroutines and Flows handle them correctly. See also https://github.com/google/ground-platform/issues/931.
There are a few places in the code base where we currently throw exceptions that we might be able to convert to nullable return values or Kotlin's
Result
type instead, for example, in the SubmissionConverter.We should do a pass to see if there are any cases in which we're overusing exceptions, or not using exceptions for cases that really are exceptional.
See https://github.com/google/ground-android/pull/2214#discussion_r1475224703 for additional context.