update
This commit is contained in:
11
codesnippet/showstacktrace.jl
Normal file
11
codesnippet/showstacktrace.jl
Normal file
@@ -0,0 +1,11 @@
|
||||
try
|
||||
# put code here
|
||||
catch e
|
||||
io = IOBuffer()
|
||||
showerror(io, e)
|
||||
errorMsg = String(take!(io))
|
||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
@warn "Error occurred: $errorMsg\n$st"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user