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

[fix] remove useless panics #324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avelex
Copy link

@avelex avelex commented Feb 27, 2023

The main goal of PR is to remove unnecessary panic where it should not be.

For example:

msg, err := message.ToMessage()
if err != nil {
	panic(err)
}

So If such code is placed in a function which does not mean panic is present, unpleasant things may happen in the future. This is why panics have been removed from the statefunContext and storage module.

Also, the prefix Must has been added to functions that must be completed and cannot be avoided in the future

Copy link

@tbal999 tbal999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me what you have done

@pocockn
Copy link

pocockn commented Mar 8, 2023

LGTM

@avelex
Copy link
Author

avelex commented Mar 14, 2023

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.

3 participants