Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added errInvalidSpan #10

Merged
merged 4 commits into from Apr 12, 2019
Merged

Added errInvalidSpan #10

merged 4 commits into from Apr 12, 2019

Conversation

robcapo
Copy link
Collaborator

@robcapo robcapo commented Apr 12, 2019

This error is to make it clear in the unlikely event that the Location proto is corrupted with bad span data.

Rather than implicitly creating an invalid Location, we should propagate this error up to the user so it's clear to them that we were not able to create a Location.

The error is package private because the fact that we're using "spans" to create the location is an implementation detail, so the user should never depend on this specific error, only that we are unable to create the Location for them.

@robcapo robcapo requested a review from mingzhi April 12, 2019 20:21
@robcapo robcapo changed the base branch from master to core-skeleton April 12, 2019 20:21
lint/source.go Outdated Show resolved Hide resolved
@mingzhi mingzhi merged commit 4eabf74 into core-skeleton Apr 12, 2019
@mingzhi mingzhi deleted the span_error branch April 16, 2019 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants