Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit 61936f0

Browse files
authored
Merge pull request #524 from JuliaGPU/tb/showerror
Minor exception display changes.
2 parents 9cd6d5b + 99b5bda commit 61936f0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/device/cuda/atomics.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ struct AtomicError <: Exception
303303
msg::AbstractString
304304
end
305305

306+
Base.showerror(io::IO, err::AtomicError) =
307+
print(io, "AtomicError: ", err.msg)
308+
306309
"""
307310
@atomic a[I] = op(a[I], val)
308311
@atomic a[I] ...= val

src/exceptions.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ function Base.showerror(io::IO, err::KernelException)
1010
print(io, "KernelException: exception thrown during kernel execution on device $(CUDAdrv.name(err.dev))")
1111
end
1212

13-
Base.show(io::IO, err::KernelException) = print(io, "KernelException($(err.dev))")
14-
1513

1614
## exception handling
1715

0 commit comments

Comments
 (0)