Accessing method and parameter history with Java
<p>I'm currently working in a project in Liferay in which i'd like to be able to access my method and parameters these methods were given, in the history. This is done in case there is an exception being thrown in certain blocks of code.</p>

<p>I've already searched and it is easy to get the method name history (Thread.currentThread().getStackTrace();) but i'd like to also know what parameters were given to these methods.</p>

<p>For example:</p>

<pre><code>public class A {
    public static void main(String[] Args) {
        try {
            System.out.println(new B().someMethod(5));
        } catch (Exception e) {
            //GET HISTORY
        }
    }
}

public class B {
    public int someMethod(int i) throws Exception {
        i += 2;
        throw new Exception("Expected Exception to Generate History Search");
        return i;
    }
}
</code></pre>

<p>Is it possible to learn how can i, in class A, when I catch the exception, all that data? And of so, how do I do that?</p>
