J
Jaap de Bergen
Hello all,
I'm using a O/R framework which throws a runtimeexception when
something goes wrong (for example a column is missig from the
database).
A couple of facts:
I've made a couple of DAO's which access the O/R framework.
The DAO's are being accessed by a Thread.
I'm starting my application with the following code:
App a=new App();
I try to catch the runtimeexceptions which the O/R framework throws at
the root of my program:
try{
App a=new App();
}
catch(Runtimeexception e){
displayDialog(e)'
}
That was a good idea, but it doesn't work. I guess because when i
launch a thread:
MyThreadt=new MyThread();
t.start()
MyThread extends Thread{
public void run(){
DAO.accesDAOfunction();
}
}
and call a DAO function in that thread the runtimeexception will not
go further "upwards" then MyThread. In other words it will never
reach:
try{
App a=new App();
}
catch(Runtimeexception e){
displayDialog(e)'
}
Does anybody know how i can get the runtimeexception reach the root of
my application?
Kind regards,
Jaap
I'm using a O/R framework which throws a runtimeexception when
something goes wrong (for example a column is missig from the
database).
A couple of facts:
I've made a couple of DAO's which access the O/R framework.
The DAO's are being accessed by a Thread.
I'm starting my application with the following code:
App a=new App();
I try to catch the runtimeexceptions which the O/R framework throws at
the root of my program:
try{
App a=new App();
}
catch(Runtimeexception e){
displayDialog(e)'
}
That was a good idea, but it doesn't work. I guess because when i
launch a thread:
MyThreadt=new MyThread();
t.start()
MyThread extends Thread{
public void run(){
DAO.accesDAOfunction();
}
}
and call a DAO function in that thread the runtimeexception will not
go further "upwards" then MyThread. In other words it will never
reach:
try{
App a=new App();
}
catch(Runtimeexception e){
displayDialog(e)'
}
Does anybody know how i can get the runtimeexception reach the root of
my application?
Kind regards,
Jaap