JuliaOpt/JuMP.jl — pull request #177 by IainNZ (2014-05-13 02:53:10+00:00)
Title: More nice macro error messages

```julia
using JuMP
m = Model()
@defVar(m, x>=0)

@setObjective(m, 5x)
# Before:
# ERROR: wrong number of arguments
# After:
# ERROR: in @setObjective: need objective (Max or Min) and expression.

@setObjective(m, Max, x^2)
# Before:
# ERROR: Cannot construct an affine expression with a term of type GenericQuadExpr{Float64,Variable}
# Now:
# ERROR: Marcos (@addConstraint, @setObjective) do not support quadratic expressions.
# Use addConstraint/setObjective instead
```