@@ -277,7 +277,7 @@ function convert{T, f, U, g}(::Type{FD{T, f}}, x::FD{U, g})
277
277
if r == 0
278
278
reinterpret (FD{T, f}, T (q))
279
279
else
280
- throw (InexactError ())
280
+ throw (InexactError (:convert , FD{T, f}, x ))
281
281
end
282
282
end
283
283
end
@@ -299,7 +299,7 @@ function convert{TF <: BigFloat, T, f}(::Type{TF}, x::FD{T, f})::TF
299
299
end
300
300
301
301
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 ))
303
303
div (x. i, coefficient (FD{T, f}))
304
304
end
305
305
@@ -412,7 +412,7 @@ function parse{T, f}(::Type{FD{T, f}}, str::AbstractString, mode::RoundingMode=R
412
412
val = isempty (a) ? T (0 ) : sign * parse (T, a)
413
413
if ! isempty (b) && any (collect (b[2 : end ]) .!= ' 0' )
414
414
if mode == RoundThrows
415
- throw (InexactError ())
415
+ throw (InexactError (:parse , FD{T, f}, str ))
416
416
elseif mode == RoundNearest
417
417
val += sign * parse_round (T, b, mode)
418
418
end
0 commit comments