Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Aug 16, 2024
1 parent 1553907 commit c8996c6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/NLopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,16 @@ function optimize!(o::Opt, x::Vector{Cdouble})
x,
opt_f,
)
# We do not need to check the value of `ret`. Instead, we return to the user
# and let them decide what to do.
# We do not need to check the value of `ret`, except if it is a FORCED_STOP
# with a Julia-related exception from a callback
if ret == FORCED_STOP
global nlopt_exception
e = nlopt_exception
nlopt_exception = nothing
if e !== nothing && !(e isa ForcedStop)
throw(e)
end
end
return opt_f[1], x, Symbol(ret)
end

Expand Down

0 comments on commit c8996c6

Please sign in to comment.