Celeritas
0.5.0-56+6b053cd
|
Provide contextual information about failed errors on CPU. More...
#include <KernelContextException.hh>
Public Types | |
Type aliases | |
using | Energy = units::MevEnergy |
Public Member Functions | |
KernelContextException (HostCRef< CoreParamsData > const ¶ms, HostRef< CoreStateData > const &states, ThreadId tid, std::string_view label) | |
Construct with track data and kernel label. | |
char const * | type () const final |
This class type's description. | |
void | output (JsonPimpl *json) const final |
Save context to a JSON object. | |
char const * | what () const noexcept final |
Get an explanatory message. | |
std::string const & | label () const |
Label of the kernel that died. | |
Track accessors | |
Kernel thread ID | |
ThreadId | thread () const |
Track slot ID. | |
TrackSlotId | track_slot () const |
Track slot ID. | |
EventId | event () const |
Event ID. | |
TrackId | track () const |
Track ID. | |
TrackId | parent () const |
Parent track ID. | |
size_type | num_steps () const |
Step counter. | |
ParticleId | particle () const |
Particle type. | |
Energy | energy () const |
Particle energy. | |
Real3 const & | pos () const |
Position. | |
Real3 const & | dir () const |
Direction. | |
VolumeId | volume () const |
Volume ID. | |
SurfaceId | surface () const |
Surface. | |
Provide contextual information about failed errors on CPU.
When a CPU track hits an exception, gather properties about the current thread and failing track. These properties are accessible through this exception class or they can be chained into the failing exception and processed by ExceptionOutput
as context for the failure.