Re: error handling: how to handle missing secondary database gracefully

2012-02-09 Thread qwanta
Thanks for the idea, I looked into it a little, but I don't want to mess too much with the innards of my app as someone else will be taking it over soon. What I ended up doing was placing a link next to the empty job number textbox that opens a new browser tab/window with the job number list in it

Re: error handling: how to handle missing secondary database gracefully

2012-02-08 Thread majna
Just an idea... Extend Mysql datasource: - override connect(): try { parent::connect(); } catch (Exception $e) { return false; } - override constructor - set 'autoConnect' flag to false Model::beforeFind(): $db = ConnectionManager::getDataSource('another')

error handling: how to handle missing secondary database gracefully

2012-02-07 Thread qwanta
I am reading a list of job numbers from a mysql database on an old server on my intranet. This server is completely independent from the server for my cakephp app and database. If the server is there, I populate a combobox with the list of job numbers, however, if it is down, I would like to handle