Skip to content

Commit

Permalink
Add error trace
Browse files Browse the repository at this point in the history
  • Loading branch information
hwpang committed Oct 13, 2023
1 parent 0b73624 commit b6b53cd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,25 @@ function readinputyml(fname::String)
if "adjlist" in keys(d)
try
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictadjlist(d["adjlist"])
catch
@warn("failed to generate molecular information from adjlist for species $spcname")
catch e
showerror(stdout, e)
display(stacktrace(catch_backtrace()))
@warn("failed to generate molecular information from adjlist for species $spcname")
end
elseif "smiles" in keys(d)
try
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictsmiles(d["smiles"])
catch
catch e
showerror(stdout, e)
display(stacktrace(catch_backtrace()))
@warn("failed to generate molecular information from smiles for species $spcname")
end
elseif "inchi" in keys(d)
try
d["atomnums"],d["bondnum"],d["molecularweight"] = getatomdictinchi(d["inchi"])
catch
catch e
showerror(stdout, e)
display(stacktrace(catch_backtrace()))
@warn("failed to generate molecular information from inchi for species $spcname")
end
end
Expand Down

0 comments on commit b6b53cd

Please sign in to comment.