I am fairly new to java ( I am a C# programmer). I am writing a custom error class in Java that extends Exception. However, I do not see an "inner Exception" in which to hold the original exception that occurred. When creating a custom Java exception, how do you save the original exception?
So if I catch an Index out of range exception and wrap that into my custom class, I do not want to loose the index out of range exception. More importantly I do not want to loose the stack trace. What is the best practice?