My problem is as follows. I need to catch the exception on query in controller. Query depends on user input, so It is possible(and probable) that many times user will generate error. I want to handle it in my own way.
I tried this:
I searched whole internet, but nothing helped. Tried \PDOException etc., and still nothing. CakePHP 3.4.3 (PHP 5)