Skip to content

Commit d0125df

Browse files
committed
Merge pull request #45 from rsrock/rsr/err-library-name
Report the library that triggered the error
2 parents 6e8911d + 642b6e6 commit d0125df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/error_handling.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ Base.showerror(io::IO, e::UnknownFormat) = println(io, e.format, " couldn't be r
4646
@doc """
4747
Handles error as soon as they get thrown while doing IO
4848
""" ->
49-
function handle_current_error(e, islast)
49+
function handle_current_error(e, library, islast::Bool)
5050
bt = catch_backtrace()
5151
bts = sprint(io->Base.show_backtrace(io, bt))
52-
message = islast ? "" : "\nTrying next loading library! Please report this issue on Github"
52+
message = islast ? "" : "\nTrying next loading library! Please report this issue on the Github page for $library"
5353
warn(string(e, bts, message))
5454
end
5555
handle_current_error(e::NotInstalledError) = warn(string("lib ", e.library, " not installed, trying next library"))

src/loadsave.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function load{F}(q::Formatted{F}, args...; options...)
7676
Library = checked_import(library)
7777
return Library.load(q, args...; options...)
7878
catch e
79-
handle_current_error(e, library == last(libraries))
79+
handle_current_error(e, library, library == last(libraries))
8080
push!(failures, (e, q))
8181
end
8282
end
@@ -91,7 +91,7 @@ function save{F}(q::Formatted{F}, data...; options...)
9191
Library = checked_import(library)
9292
return Library.save(q, data...; options...)
9393
catch e
94-
handle_current_error(e, library == last(libraries))
94+
handle_current_error(e, library, library == last(libraries))
9595
push!(failures, (e, q))
9696
end
9797
end

0 commit comments

Comments
 (0)