Is there any way to access exception variable lenght in catch space?
public class myexception extends Exception{
public int lenght;
myexception (int a){
this.lenght=a;
}
}
try{
if(something) throw new myexception (10);
}
catch(Exception e){System.out.println(e.lenght);}