When exceptions are enabled, a DbException object is thrown when a database error is encountered. To enable database exceptions, which are off by default, please refer to the DbConnection.enableExceptions() method.
Returns a DbError object
Returns the error object contained by the exception object. Less often an exception object may contain more than one error. In this case, the first error object is returned. To retrieve all error objects contained in the exception object, use the getErrors() method.
Returns an array of DbError object
Returns all error objects contained by the DbException object