From 69e74190af1efcbd1b2d2c66df31dd2a3f0b8106 Mon Sep 17 00:00:00 2001 From: kalmar Date: Fri, 31 Mar 2017 22:34:56 +0200 Subject: [PATCH] tad better try...catch syntax --- src/PropertyT.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/PropertyT.jl b/src/PropertyT.jl index 9585359..09d091a 100644 --- a/src/PropertyT.jl +++ b/src/PropertyT.jl @@ -124,13 +124,11 @@ function compute_κandA(sdp_constraints, Δ::GroupAlgebraElement, solver::Abstra t = @timed SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound) info(logger, timed_msg(t)) - κ = 0.0 - A = nothing while κ == 0.0 - try - κ, A = solve_SDP(SDP_problem, solver) + κ, A = try + solve_SDP(SDP_problem, solver) catch y - warn(solver_logger, y) + warn(logger, y) end end return κ, A