attachComposeStackTrace
Attaches the composition stack trace of this component's declaration to throwable as a suppressed exception, and reports whether it did. The trace names the composable that declared the component, the calls that led there and the file and line of each.
The composition it names is the one findDeclaringGroup answers from.
false means no trace was attached, for any of:
the application has not put the Compose runtime into a diagnostic stack trace mode, which
Composer.setDiagnosticStackTraceMode(ComposeStackTraceMode.SourceInformation)puts it in and is the application's to set rather than this library's;no composition this library mounted declared the component;
the composition has not recorded source information yet - the re-insertion isDebugInspectorInfoEnabled asks of an already-mounted composition lands on a later recomposition pass;
throwable already carries a composition stack trace;
the composition recorded no source information at all, which is what a build the Compose compiler emits none for leaves;
the composition's content provides no androidx.compose.runtime.CompositionLocal, so the runtime recorded no scope for it and there is nothing to build a trace from.
A failure raised while the trace is being built is suppressed onto throwable in the trace's place, and the return stays false.
Must be called on the Event Dispatch Thread.
Return
whether this call attached a trace.
Parameters
the throwable the trace is suppressed onto, in flight or newly built - it is the one the trace travels with, so attach to what is thrown rather than to a copy.