google / google/ground-android

[Code health] Revisit use of Exceptions and Nullable Types

Open
#2,216 1 comment 1 reaction 0 assignees View on GitHub
type: code health
Dominant language
Kotlin
Stars
293
Forks
149
Avg merge
1d 16h
Merged PRs (30d)
42

Description

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](https://github.com/google/ground-android/blob/6ea86989fd8d9e2e366412a2c139b55306679de0/ground/src/main/java/com/google/android/ground/persistence/remote/firebase/schema/SubmissionConverter.kt#L87).

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.