Forums

How to detect source & cause of db read failue

NickOg 03 May, 2019
Trying to tidy up error reporting of db activity failure. Is it possible to work out from $this which table or model triggered that failure? And perhaps what caused the failure - not found or fail? I have it in mind to use a common db fail block to report which table (??), form $this->_vars['__connection']['alias'];) and event ($this->_vars['__event']) & form version ($this->_vars['__connection']['id']) triggered that failure.

Nick
healyhatman 03 May, 2019
The fail block is for when you've set the read or write to STOP when missing data.
NickOg 03 May, 2019
Yes but I was looking for info from $this that I might use to provide information about that failure. Some I can pick up - form, event and the like - but wondewed if information about the failing table action might be available.
Max_admin 04 May, 2019
Answer
Hi Nick,

Please do not use the internal variables of this as those may change without notice, you can just hardcode that tablename/event name in your reporting code ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 04 May, 2019
Got that Max. Thanks

Nick
This topic is locked and no more replies can be posted.