MCPcopy Create free account
hub / github.com/davidgiven/luje / setStackTrace

Method setStackTrace

lib/java/lang/Throwable.java:194–202  ·  view source on GitHub ↗

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(). @param trace the new arra

(StackTraceElement[] trace)

Source from the content-addressed store, hash-verified

192 * @see #printStackTrace()
193 */
194 public void setStackTrace(StackTraceElement[] trace) {
195 StackTraceElement[] newTrace = trace.clone();
196 for (java.lang.StackTraceElement element : newTrace) {
197 if (element == null) {
198 throw new NullPointerException();
199 }
200 }
201 stackTrace = newTrace;
202 }
203
204 /**
205 * Writes a printable representation of this {@code Throwable}'s stack trace

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected