Skip to content

Tracking issue for StatusOr Experimental API  #11563

Open
@kannanjgithub

Description

@kannanjgithub

Allow null?
StatusOr needs to be as expressive as a method return value, although it will generally not be null. Can potentially use StatusOr<@nonnull> in cases it should be disallowed.

Should getValue() throw if there is no value?
Go with just getValue() throwing IllegalStateException for now. Can add getValueOrNull, getValueOrDefault, getValueOrThrow as we find usecases. Seems the majority case should check getStatus() first.

Metadata

Metadata

Assignees

Labels

experimental APIIssue tracks stabilizing an experimental API

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions