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

add informative error message for map!(f, array) #35186

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

rfourquet
Copy link
Member

For example:

julia>  map!(-, [1]) # master
ERROR: BoundsError: attempt to access ()
  at index [1]
Stacktrace:
[...]

julia>  map!(-, [1]) # PR
ERROR: ArgumentError: map! requires at least one "source" argument
Stacktrace:
[...]

For example:
```julia
julia>  map!(-, [1]) # master
ERROR: BoundsError: attempt to access ()
  at index [1]
Stacktrace:
[...]

julia>  map!(-, [1]) # PR
ERROR: ArgumentError: map! requires at least one "source" argument
Stacktrace:
[...]
```
@rfourquet rfourquet added error handling Handling of exceptions by Julia or the user collections Data structures holding multiple items, e.g. sets labels Mar 20, 2020
@dkarrasch dkarrasch merged commit afb9ad4 into master Mar 31, 2020
@dkarrasch dkarrasch deleted the rf/warn-map-bang-1arg branch March 31, 2020 07:59
oxinabox pushed a commit to oxinabox/julia that referenced this pull request Apr 8, 2020
ravibitsgoa pushed a commit to ravibitsgoa/julia that referenced this pull request Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants