mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[debugger] print more details in exceptions from helper methods
GitOrigin-RevId: bf8b4d2067df69762614b98720f88dea046fed6f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cdf785fc8e
commit
5cf5d1b3d0
@@ -0,0 +1,17 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.rt.debugger;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
public final class ExceptionDebugHelper {
|
||||
public static String getThrowableText(Throwable t) {
|
||||
StringWriter writer = new StringWriter();
|
||||
t.printStackTrace(new PrintWriter(writer));
|
||||
return writer.getBuffer().toString();
|
||||
}
|
||||
|
||||
public static int getCurrentThreadStackDepth() {
|
||||
return Thread.currentThread().getStackTrace().length;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user