Skip to content

Commit ceccb68

Browse files
authored
Merge pull request #543 from JuliaArrays/teh/dm
Return DimensionMismatch rather than ErrorException
2 parents a46d711 + 4ac3e4e commit ceccb68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/convert.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@inline Tuple(a::StaticArray) = unroll_tuple(a, Length(a))
1414

1515
@noinline function dimension_mismatch_fail(SA::Type, a::AbstractArray)
16-
error("Dimension mismatch. Expected input array of length $(length(SA)), got length $(length(a))")
16+
throw(DimensionMismatch("expected input array of length $(length(SA)), got length $(length(a))"))
1717
end
1818

1919
@inline function convert(::Type{SA}, a::AbstractArray) where {SA <: StaticArray}

0 commit comments

Comments
 (0)