MCPcopy Index your code
hub / github.com/davidgiven/luje / initCause

Method initCause

lib/java/lang/Throwable.java:346–355  ·  view source on GitHub ↗

Initializes the cause of this Throwable. The cause can only be initialized once. @param throwable the cause of this Throwable. @return this Throwable instance. @throws IllegalArgumentException if Throwable is this object. @throws IllegalStateEx

(Throwable throwable)

Source from the content-addressed store, hash-verified

344 * if the cause has already been initialized.
345 */
346 public synchronized Throwable initCause(Throwable throwable) {
347 if (cause == this) {
348 if (throwable != this) {
349 cause = throwable;
350 return this;
351 }
352 throw new IllegalArgumentException("Cause cannot be the receiver");
353 }
354 throw new IllegalStateException("Cause already initialized");
355 }
356
357 /**
358 * Returns the cause of this {@code Throwable}, or {@code null} if there is

Callers 2

openMethod · 0.80
getCharsetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected