Skip to content

Commit 5459c28

Browse files
committed
Show error trace in the wild try catch block
1 parent cd89bcd commit 5459c28

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Parse.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,25 @@ function readinputyml(fname::String)
305305
if "adjlist" in keys(d)
306306
try
307307
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictadjlist(d["adjlist"])
308-
catch
309-
@warn("failed to generate molecular information from smiles for species $spcname")
308+
catch e
309+
showerror(stdout, e)
310+
display(stacktrace(catch_backtrace()))
310311
@warn("failed to generate molecular information from adjlist for species $spcname")
311312
end
312313
elseif "smiles" in keys(d)
313314
try
314315
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictsmiles(d["smiles"])
315-
catch
316+
catch e
317+
showerror(stdout, e)
318+
display(stacktrace(catch_backtrace()))
316319
@warn("failed to generate molecular information from smiles for species $spcname")
317320
end
318321
elseif "inchi" in keys(d)
319322
try
320323
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictinchi(d["inchi"])
321-
catch
324+
catch e
325+
showerror(stdout, e)
326+
display(stacktrace(catch_backtrace()))
322327
@warn("failed to generate molecular information from inchi for species $spcname")
323328
end
324329
end

0 commit comments

Comments
 (0)