Skip to content

Commit

Permalink
Instantiate ArgumentError before throwing it (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlozanella authored and ararslan committed Apr 13, 2017
1 parent 65f12d8 commit cff0eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bracketing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function init_state{T <: Float64}(method::Bisection, fs, x::Vector{T}, bracket)
isinf(x2) && (x2 = prevfloat(x2))
@compat y0, y2 = fs.f.([x0, x2])

sign(y0) * sign(y2) > 0 && (warn(bracketing_error); throw(ArgumentError))
sign(y0) * sign(y2) > 0 && throw(ArgumentError(bracketing_error))

state = UnivariateZeroState(x2, x0,
y2, y0,
Expand Down

0 comments on commit cff0eaf

Please sign in to comment.