variables in blocks are reused; define A before try

or face UndefVarError: A not defined
This commit is contained in:
kalmar 2017-03-22 12:24:36 +01:00
parent 6fe0f9bda0
commit 3dc571a47c
1 changed files with 3 additions and 2 deletions

View File

@ -89,9 +89,10 @@ function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::
info(logger, timed_msg(t))
κ = 0.0
A = nothing
while κ == 0.0
κ, A = try
solve_SDP(SDP_problem, solver)
try
κ, A = solve_SDP(SDP_problem, solver)
catch y
warn(solver_logger, y)
end