Exemplo n.º 1
0
 /**
  * @return	null
  */
 public function testDefaultSqlState()
 {
     $error = new DbError(12345, 'my message');
     $this->assertEquals(12345, $error->getCode());
     $this->assertEquals('my message', $error->getMessage());
     $this->assertNull($error->getSqlState());
 }
Exemplo n.º 2
0
 /**
  * Override error constructor to add the key (index number or label) of
  * which data set (sql stmt) this error occured for
  *
  * @param	mixed	int | string	$code
  * @param	string	$code
  * @param	string	$msg
  * @param	string	$sqlState
  * @return	MultiQueryError
  */
 public function __construct($key, $code, $msg = null, $sqlState = null)
 {
     parent::__construct($code, $msg, $sqlState);
     $this->index = $key;
 }