Skip to content

[fix] remove useless panics#324

Open
avelex wants to merge 1 commit into
apache:masterfrom
avelex:fix/remove-useless-panic
Open

[fix] remove useless panics#324
avelex wants to merge 1 commit into
apache:masterfrom
avelex:fix/remove-useless-panic

Conversation

@avelex

@avelex avelex commented Feb 27, 2023

Copy link
Copy Markdown

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

@tbal999 tbal999 left a comment

Copy link
Copy Markdown

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

pocockn commented Mar 8, 2023

Copy link
Copy Markdown

LGTM

@avelex

avelex commented Mar 14, 2023

Copy link
Copy Markdown
Author

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