14 Apr
2005
14 Apr
'05
2:38 p.m.
On 13 Apr, 2005, at 22:28, Syscrusher wrote:
The obvious thing to try was calling @db_query() to try to suppress the error message. That does what I need, but puts the database error into the output shown to the user. Since I know what is the specific situation, I want to suppress that output for this call only, without overriding the site-wide setting that causes errors to go only into the log. (Ideally, this particular error doesn't belong in the log, either, since I essentially am generating it on purpose).
The only way would probably be to use set_error_handler() to set a new error handler (that just ignores the error) and then restore Drupal's with restore_error_handler().