[Resend to mailinglist]

Hi Laszlo,


Am 29.03.2021 um 04:12 schrieb Laszlo Kishalmi:
I would like to ask your wisdom. I would like to trace the calls to the Gradle project loading infrastructure, as some reloads are happening without a reason (at least for me). So in the Gradle project loading I would like to know 3 things: The original caller thread name if possible, the callstack and a reason message.

For the purpose it seems to be good to create a custom Exception type and pass instances of it as a parameter through the call chain. So at the point of loading I can print some nice debug messages. Though these custom exceptions are not meant to be thrown or to be caught.

Could this be a valid use case to use Exceptions for such purpose?

on JDK 9+ StackWalker sounds like the API to get you the callstack information you are looking for:

https://docs.oracle.com/javase/9/docs/api/java/lang/StackWalker.html

Greetings

Matthias



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to