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

[docs] syntax errors in "Error and panic handling" #479

Closed
brasic opened this issue Jul 29, 2024 · 3 comments
Closed

[docs] syntax errors in "Error and panic handling" #479

brasic opened this issue Jul 29, 2024 · 3 comments

Comments

@brasic
Copy link

brasic commented Jul 29, 2024

I noticed that the code examples at https://riverqueue.com/docs/error-handling include some syntax errors, possibly from a past find-and-replace operation. The job param is listed in three places as being type *river.rivertype.JobRow which is not legal syntax.

func (*CustomErrorHandler) HandleError(ctx context.Context, job *river.rivertype.JobRow, err error) *river.ErrorHandlerResult {
    fmt.Printf("Job errored with: %s\n", err)
    return nil
}
 ./prog.go:6:81: syntax error: unexpected . in parameter list; possibly missing comma or )
@brandur
Copy link
Contributor

brandur commented Jul 29, 2024

Thanks @brasic! Quite right. I just pushed up a fix to correct these.

@brandur brandur closed this as completed Jul 29, 2024
@brasic
Copy link
Author

brasic commented Jul 29, 2024

@brandur cheers! FYI that it looks like the example is still not usable as-is since the interface gained a trace param for HandlePanic in #423.

@brandur
Copy link
Contributor

brandur commented Jul 30, 2024

Thanks again. Just updated those signatures as well.

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

No branches or pull requests

2 participants