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

Handle errors in functions passed as arguments #9

Open
aswinkarthik opened this issue Oct 12, 2019 · 0 comments
Open

Handle errors in functions passed as arguments #9

aswinkarthik opened this issue Oct 12, 2019 · 0 comments
Assignees

Comments

@aswinkarthik
Copy link
Contributor

Currently, we assume that the predicate/mapper/reducer functions will only return one type of value. There are cases where the functions may generate errors inside.

In order to handle this, let each function have an optional additional return type which can only be of type error interface. This error can be returned by godash to the caller.

However, there is a need to differentiate godash errors from other errors. Hence, we need a custom error for all the validations that we do through reflection.

@aswinkarthik aswinkarthik self-assigned this Oct 14, 2019
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

1 participant