JuliaLang/julia — pull request #6698 by staticfloat (2014-04-30 19:24:49+00:00)
Title: Add better error messages for dimension mismatches in promote_array

Before this change:

```julia
julia> [1 2 3] + [1 2]
ERROR: dimensions must match

julia>
```

After this change:
```julia
julia> [1 2 3] + [1 2]
ERROR: DimensionMismatch("Cannot promote dimensions (1,3) to (1,2)")
in promote_shape at operators.jl:175
in + at array.jl:709

julia> [1 2 3] + [1 2; 2 3]
ERROR: DimensionMismatch("Cannot promote dimensions (1,3) to (2,2)")
in promote_shape at operators.jl:175
in + at array.jl:709

julia>
```