cuda::experimental::stf::sump::notify_t#

struct notify_t#

A suppressing handler policy that reports an error and resumes (std::ignore).

notify ->* callable reports on stderr. A configured copy reports elsewhere: notify(file) writes to a FILE*, notify(stream) to a std::ostream. An object rather than a function because it is an overload set, which must travel as one value.

The report carries the location and the exception’s message, or “nonstandard exception” for an exception that does not derive from std::exception (which reaches a handler as nullptr). On the code channel it carries status_traits<S>::name(status) and no exception is built. Both hooks return std::ignore, marking a resuming policy.

Public Functions

inline notify_t operator()(::FILE *__file) const#

Returns a copy configured to report on __file instead of stderr.

inline notify_t operator()(::std::ostream &__os) const#

Returns a copy configured to report on __os instead of stderr.

template<class _Fn>
inline void on_thrown(
const ::std::exception *__exception,
const ::cuda::std::source_location __loc,
_Fn&
) const noexcept#

Reports the exception and resumes.

Writes to the configured std::ostream if any, else __file_ (default stderr). The ostream write is best-effort: a stream configured to throw does not get to end the program from inside a handler.

template<class _Status, class _Fn>
inline void on_returned(
const _Status __status,
const ::cuda::std::source_location __loc,
_Fn&
) const noexcept#

The code-channel hook: reports status_traits<_Status>::name(__status); the status is handled and left unchanged.

A name that cannot be formatted (its allocation failed) is reported as such.