If, in a function. I execute this (wrong) query:
try
{
return $this->wpdb->get_var('SELECT * from mickeymouse'); //intentional bug: there isn't a table "mickeymouse"
}
catch(Exception $e) //.. but this code is not executed!
{
echo 'My custom message';
return false;
}
I get a wordpress exception (sql error is printed and the code is broken).
I would like my exception (my custom message) to be thrown instead.
It’s possible?