Re: Catching an error when the result is vital
- From: Synic <flavp+hfrarg@xxxxxxxxxxxxx>
- Date: 11 Jan 2006 06:14:17 +0800
Synic <flavp+hfrarg@xxxxxxxxxxxxx> wrote:
> Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx> wrote:
>> Exactly what happens when you run the following code:
>>
>> if {[catch {::mysql::connect ...} result]} {
>> puts "caught an error: $result"
>> } else {
>> puts "didn't catch an error: $result"
>> set LINK $result
>> }
>
> Tried just then using the code above.
>
> Same result as before:
>
> ::mysql::connect/db server: Can't connect to MySQL server on
> 'foo.bar.com' (10061) while executing
> "::mysql::connect -user foo -password bar -host foo.bar.com -db foo
> -port 5506 -compress true" (procedure "Init" line 4) invoked from
> within [...]
>
> From that dialog titled "Error in startup script".
Just to confirm from the other direction... When running the script
while the MySQL server is up, I get the message:
didn't catch an error: mysql1
Then the app runs happily with its connection being alive.
.
- References:
- Catching an error when the result is vital
- From: Synic
- Re: Catching an error when the result is vital
- From: Bryan Oakley
- Re: Catching an error when the result is vital
- From: Synic
- Re: Catching an error when the result is vital
- From: Bryan Oakley
- Re: Catching an error when the result is vital
- From: Synic
- Catching an error when the result is vital
- Prev by Date: Re: Catching an error when the result is vital
- Next by Date: Re: Catching an error when the result is vital
- Previous by thread: Re: Catching an error when the result is vital
- Next by thread: Re: Catching an error when the result is vital
- Index(es):
Relevant Pages
|