The OpenD Programming Language

Runtime.traceHandler

Overrides the default trace mechanism with a user-supplied version. A trace represents the context from which an exception was thrown, and the trace handler will be called when this occurs. The pointer supplied to this routine indicates the base address from which tracing should occur. If the supplied pointer is null then the trace routine should determine an appropriate calling context from which to begin the trace.

If the deallocator is set, then it is called with the traceinfo when the exception is finalized. The deallocator is only set in the exception if the default handler is used to generate the trace info.

  1. void traceHandler(TraceHandler h, Throwable.TraceDeallocator d)
    struct Runtime
    extern (C) pragma(mangle, "rt_setTraceHandler") static @property
    void
    traceHandler
    (
    TraceHandler h
    ,
    Throwable.TraceDeallocator d = null
    )
  2. TraceHandler traceHandler [@property getter]

Parameters

h TraceHandler

The new trace handler. Set to null to disable exception backtracing.

d Throwable.TraceDeallocator

The new trace deallocator. If non-null, this will be called on exception destruction with the trace info, only when the trace handler is used to generate TraceInfo.

Meta