Discussion:
Try to catch if an instance is running
Paul-Benoit Larochelle
2005-11-09 04:34:01 UTC
Permalink
Hello,

sorry do not know if I e-mail at the good place... not clear in the html
where to post a question

I'm using an embedded database...
if an instance is already running I would like to be able to send a
message to the user "you already have an instance of the application
running"
however even if I do

try {
conn = DriverManager.getConnection(url, username, password);
}
catch (Exception e) {
System.out.println(
"Unable to make a connection to the database.\n" +
"The reason: " + e.getMessage());
return;

}

the catch catches nothing and the application crashed with an error
about the journal file
How can I trap the exception ?

Thanks Paul-Benoit
Paul-Benoit Larochelle
2005-11-09 15:56:01 UTC
Permalink
Thanks a lot it works...

Paul-Benoit

-----Original Message-----
From: Hrvoje Bartolin [mailto:***@etna.hr]
Sent: Wednesday, November 09, 2005 04:01
To: ***@sympatico.ca
Subject: Re: Try to catch if an instance is running



I dont have McKoi documentation here, try to catch Throwable.


Srdaèan pozdrav,

Hrvoje Bartolin
Etna d.o.o.




"Paul-Benoit Larochelle" <***@sympatico.ca>


09.11.2005 05:34


Please respond to
***@mckoi.com



To
<***@mckoi.com>

cc

Subject
Try to catch if an instance is running






Hello,

sorry do not know if I e-mail at the good place... not clear in the html
where to post a question

I'm using an embedded database...
if an instance is already running I would like to be able to send a
message to the user "you already have an instance of the application
running"
however even if I do

try {
conn = DriverManager.getConnection(url, username, password);
}
catch (Exception e) {
System.out.println(
"Unable to make a connection to the database.\n" +
"The reason: " + e.getMessage());
return;

}
the catch catches nothing and the application crashed with an error
about the journal file
How can I trap the exception ?

Thanks Paul-Benoit

Loading...