Ignore certain errors in $wpdb
-
I have recently switched my plugin from using the mysql library to using the $wpdb API in WordPress.
When using the mysql library, I would catch exceptions, and if it was for a duplicate entity, execute alternate logic and suppress the error.
With $wpdb, the error is being returned in the response msg as an html block, followed by my json block.
How do I suppress a specific error, i.e. if it is Duplicate entity error, I want to ignore it, else I want to have the error thrown as normal
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Ignore certain errors in $wpdb’ is closed to new replies.