com.g2forge.alexandria.java.debug.Trace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.debug;
import lombok.AccessLevel;
import lombok.Getter;
public class Trace {
@Getter(AccessLevel.PROTECTED)
protected final Throwable throwable;
public Trace() {
this.throwable = HDebug.isDebugEnabled() ? new Throwable("Creation point") : null;
}
public T addTrace(T throwable) {
final Throwable mine = getThrowable();
if (mine != null) throwable.addSuppressed(mine);
return throwable;
}
}