I am trying to print the exception and params in my method. But I can`t get any result from my code.
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
@BTrace
public class HelloWorld {
@OnMethod(clazz = "com.btrace.test.service.UserServiceImpl"
, method = "test", location = @Location(Kind.ERROR))
public static void onThreadStart(Throwable exception, @Self Object self, String param1
, @Return AnyType result, @Duration long duration) {
println("UserServiceImpl param1=" + param1);
Threads.jstack(exception);
}
}
Not possible in the current version 1.3.10.2
In master the support for this was added recently https://github.com/btraceio/btrace/issues/327
You just need to annotate the
Throwableargument with@TargetInstance