mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-02 22:55:53 +00:00
Functions.printStackTrace utility method.
This commit is contained in:
1 parent
24aa20635d
commit
76aa0727f0
32 files changed
+73
-52
No files matched your search
@@ -156,6 +156,7 @@ import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import hudson.model.PasswordParameterDefinition;
|
||||
import hudson.util.RunList;
|
||||
import java.io.PrintStream;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -1505,6 +1506,26 @@ public class Functions {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Like {@link Throwable#printStackTrace(PrintWriter)} but using {@link #printThrowable} format.
|
||||
* @param t an exception to print
|
||||
* @param pw the log
|
||||
* @since FIXME
|
||||
*/
|
||||
public static void printStackTrace(@CheckForNull Throwable t, @Nonnull PrintWriter pw) {
|
||||
pw.println(printThrowable(t).trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* Like {@link Throwable#printStackTrace(PrintStream)} but using {@link #printThrowable} format.
|
||||
* @param t an exception to print
|
||||
* @param ps the log
|
||||
* @since FIXME
|
||||
*/
|
||||
public static void printStackTrace(@CheckForNull Throwable t, @Nonnull PrintStream ps) {
|
||||
ps.println(printThrowable(t).trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of rows needed for textarea to fit the content.
|
||||
* Minimum 5 rows.
|
||||
|
||||
Reference in new issue
Block a user