JuliaOpt/JuMP.jl — pull request #190 by IainNZ (2014-05-26 21:34:25+00:00)
Title: Better error message when providing wrong number of arguments

I do this all the time when reorganizing models, the default message sucks.

So instead of

```
ERROR: no method getindex(JuMPDict##7068{Variable}, Int64)
in include at boot.jl:244
in include_from_node1 at loading.jl:128
while loading /home/idunning/.julia/v0.3/JuMP/break.jl, in expression starting on line 5
```

we'll now have

```
ERROR: Wrong number of indices for x, expected 2
in getindex at no file
in include at boot.jl:244
in include_from_node1 at loading.jl:128
while loading /home/idunning/.julia/v0.3/JuMP/break.jl, in expression starting on line 5
```

```
using JuMP
m=Model()
@defVar(m, x[1:5,1:5])
x[2,1]
x[1]
```