Skip to content

Only throw exceptions for error conditions #49

@iFergal

Description

@iFergal
try {
  // Try to fetch something
  s = client.fetchSomething("name")
} catch { // failed because it doesn't exist
  // Make something
  s = client.createSomething("name")
}

Perhaps having fetchSomething return an Optional type or even having a method doesSomethingExist would be better

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions