I am trying to catch an exception, and then throw it.
try{
arr = new class[arrLen]; //Goes to a constructor that may cause an exception
}
catch(Exception e){
MyException e = new MyException;
throw e;
}
As you can see, I am trying to execute a command, and then if it causes an exception, I want to create a new instance of MyException and then throw it.
What I am having problems with is whether I am supposed to create the "Exception e" and then try and create a new "MyException e", or am I supposed to make a new MyException, AKA
MyException f = new MyException;
throw f;
e. Just a feeling.