I always start cplex like for instance:
try status = solve(model) println("status: ", status) println("obj_val: ", getobjectivevalue(model)) catch msg println("ERROR SOLVING MODEL: ", msg) end
In my case typeof(msg) returns CPLEX.CplexError if solve(model) is catched, and from the example above I obtain
ERROR SOLVING MODEL: CPLEX.CplexError(1001, "CPLEX Error 1001: Out of memory.\n")
How can I obtain which error cplex throwed? Basically I am searching for somthing like
if CPLEX.CplexError(??) == 1001 #do something end
I also tried in the example above to convert the message to a string, i.e., string(msg), but this did work out either (and it does not seem to be a good solution to me).
Thank you in advance, mike