[ic] Catch database down

Marco m.mescoli at omnib.it
Tue Sep 29 12:32:12 UTC 2009

Stefan Hornburg (Racke) ha scritto:
> Marco wrote:
>> [try label=dbdown]
>>    [query
>>      type=list
>>      st=db
>>      table=my_ic_table
>>      sql=|SELECT COUNT(*) AS n FROM my_db_table;|]
>>      [list][sql-param n][/list]
>>    [/query]
>> [/try]
>> [catch label=dbdown]
>>    [/table my_ic_table connect failed/]
>>      my_db_table non connected, database down ?
>>    [/table my_ic_table connect failed/]
>> [/catch]
>> On database down i get: 'Internal Server Error' without catching.
> I tried to reproduce this and found that catching work, but probably some
> other part of your code crashes due to missing database connection.
> Check your global error log for the exact error message.
> Regards
> 	Racke
Thanks Racke, now is catching, as you write there were more db 
connection problems.

Marco "Fino alla bara sinpara"
Marco "Up to demise we rise"

More information about the interchange-users mailing list