Skip to content

Commit b216610

Browse files
committed
Correct error paths
1 parent 257eb0f commit b216610

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/reshapedarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ end
157157
(Int(quo), iszero(rem))
158158
end
159159
end::Tuple{Int,Bool}
160-
is_exact || throw2(A, dims)
160+
is_exact || throw2(len, dims)
161161
(pre..., sz, post...)::Tuple{Int,Vararg{Int}}
162162
end
163163
@inline function _reshape_uncolon(A, dims::Tuple{Vararg{Union{Integer, Colon}}})
@@ -166,7 +166,7 @@ end
166166
_any_colon(post...) && throw1(dims)
167167
len = length(A)
168168
pr = prod((pre..., post...))
169-
iszero(pr) && throw2(A, dims)
169+
iszero(pr) && throw2(len, dims)
170170
(quo, rem) = divrem(len, pr)
171171
sz, is_exact = quo, iszero(rem)
172172
is_exact || throw2(len, dims)

0 commit comments

Comments
 (0)