Java.Lang.Throwable.SetStackTrace Method
Sets the array of stack trace elements.

Syntax

[Android.Runtime.Register("setStackTrace", "([Ljava/lang/StackTraceElement;)V", "GetSetStackTrace_arrayLjava_lang_StackTraceElement_Handler")]
public virtual void SetStackTrace (StackTraceElement[] trace)

See Also

Throwable.PrintStackTrace

Parameters

trace
the new array of StackTraceElements. A copy of the array is stored in this Throwable, so subsequent changes to trace will not change the call stack stored in this Throwable.

Exceptions

TypeReason
Java.Lang.NullPointerExceptionif any element in trace is null.

Remarks

Sets the array of stack trace elements. Each StackTraceElement represents an entry in the call stack. A copy of the specified array is stored in this Throwable. will be returned by getStackTrace() and printed by printStackTrace().

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1