Skip to content

Commit cf9e967

Browse files
committed
Fix InexactError deprecation
1 parent 428207e commit cf9e967

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
julia 0.5
2-
Compat 0.17.0
2+
Compat 0.30

src/FixedPointDecimals.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function convert{T, f, U, g}(::Type{FD{T, f}}, x::FD{U, g})
277277
if r == 0
278278
reinterpret(FD{T, f}, T(q))
279279
else
280-
throw(InexactError())
280+
throw(InexactError(:convert, FD{T, f}, x))
281281
end
282282
end
283283
end
@@ -299,7 +299,7 @@ function convert{TF <: BigFloat, T, f}(::Type{TF}, x::FD{T, f})::TF
299299
end
300300

301301
function convert{TI <: Integer, T, f}(::Type{TI}, x::FD{T, f})::TI
302-
isinteger(x) || throw(InexactError())
302+
isinteger(x) || throw(InexactError(:convert, TI, x))
303303
div(x.i, coefficient(FD{T, f}))
304304
end
305305

@@ -412,7 +412,7 @@ function parse{T, f}(::Type{FD{T, f}}, str::AbstractString, mode::RoundingMode=R
412412
val = isempty(a) ? T(0) : sign * parse(T, a)
413413
if !isempty(b) && any(collect(b[2:end]) .!= '0')
414414
if mode == RoundThrows
415-
throw(InexactError())
415+
throw(InexactError(:parse, FD{T, f}, str))
416416
elseif mode == RoundNearest
417417
val += sign * parse_round(T, b, mode)
418418
end

0 commit comments

Comments
 (0)