Sets a callable (e.g., an anonymous function) that is called when the yii\\db\\Exception is thrown during the command execution. The callable’s signature should be: The default fetch mode for this command is the DB connection with which it is linked.
For data access, Active Record provides an object-oriented API. A database table is connected with an Active Record class.