Skip to content

Commit 4ac3e4e

Browse files
committed
Return DimensionMismatch rather than ErrorException
1 parent a46d711 commit 4ac3e4e

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)