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

[#58] change xerrors to fmt.Errorf #59

Merged
merged 1 commit into from
Jan 15, 2024
Merged

[#58] change xerrors to fmt.Errorf #59

merged 1 commit into from
Jan 15, 2024

Conversation

kozmod
Copy link
Owner

@kozmod kozmod commented Jan 15, 2024

Close #58

In cases with join for example

	if rbErr := tx.Rollback(ctx); rbErr != nil {
		err = xerrors.Errorf("transactor - call: %w", errors.Join(err, rbErr, ErrRollbackFailed))
	} else {
		err = xerrors.Errorf("transactor - call: %w", errors.Join(err, ErrRollbackSuccess))
	}

xerrors package is useless because errors.Join does not print stack trace and log/print an error's stack trace (using "%+v") does not print full stack trace of recursive calls.

At first need to change xerrors to stdlib error impl.

@kozmod kozmod requested a review from comfysweet January 15, 2024 12:17
@kozmod kozmod self-assigned this Jan 15, 2024
@kozmod kozmod added the enhancement New feature or request label Jan 15, 2024
@kozmod kozmod linked an issue Jan 15, 2024 that may be closed by this pull request
@kozmod kozmod removed a link to an issue Jan 15, 2024
@kozmod kozmod linked an issue Jan 15, 2024 that may be closed by this pull request
@kozmod kozmod requested review from av-ugolkov and removed request for av-ugolkov January 15, 2024 13:38
@kozmod kozmod changed the title [#58] change xerror to fmt.Errorf [#58] change xerrors to fmt.Errorf Jan 15, 2024
@kozmod kozmod merged commit 3e53375 into dev Jan 15, 2024
2 checks passed
@kozmod kozmod deleted the feature/58_remove_xerror branch January 15, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change xerror
2 participants