1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Removed InvalidKeyException references from Doctrine_Table

This commit is contained in:
zYne 2006-09-24 12:55:25 +00:00
parent 70f76a8371
commit ddca18a141
2 changed files with 11 additions and 10 deletions

View File

@ -423,7 +423,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
}
break;
endswitch;
} catch(InvalidKeyException $e) {
} catch(Doctrine_Table_Exception $e) {
}
}
@ -445,7 +445,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*/
final public function getBound($name) {
if( ! isset($this->bound[$name]))
throw new InvalidKeyException('Unknown bound '.$name);
throw new Doctrine_Table_Exception('Unknown bound '.$name);
return $this->bound[$name];
}
@ -461,7 +461,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
return $this->bound[$k];
}
}
throw new InvalidKeyException('Unknown bound '.$name);
throw new Doctrine_Table_Exception('Unknown bound '.$name);
}
/**
* returns the alias for given component name
@ -485,7 +485,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
if($name = array_search($this->boundAliases,$alias))
return $name;
throw new InvalidKeyException('Unknown alias '.$alias);
throw new Doctrine_Table_Exception('Unknown alias '.$alias);
}
/**
* unbinds all relations
@ -527,7 +527,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*/
final public function bind($name,$field,$type,$localKey) {
if(isset($this->relations[$name]))
throw new InvalidKeyException('Relation already set for '.$name);
throw new Doctrine_Table_Exception('Relation already set for '.$name);
$e = explode(" as ",$name);
$name = $e[0];
@ -635,7 +635,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
try {
$bound = $table->getBoundForName($class);
break;
} catch(InvalidKeyException $exc) { }
} catch(Doctrine_Table_Exception $exc) { }
}
if( ! isset($local))

View File

@ -1,6 +1,7 @@
<?php
ob_start();
require_once("ConfigurableTestCase.php");
require_once("ManagerTestCase.php");
require_once("ConnectionTestCase.php");
@ -37,7 +38,7 @@ error_reporting(E_ALL);
$test = new GroupTest("Doctrine Framework Unit Tests");
//$test->addTestCase(new Doctrine_DB_TestCase());
$test->addTestCase(new Doctrine_DB_TestCase());
$test->addTestCase(new Doctrine_ConnectionTestCase());
@ -81,15 +82,15 @@ $test->addTestCase(new Doctrine_ImportTestCase());
$test->addTestCase(new Doctrine_CollectionTestCase());
$test->addTestCase(new Doctrine_QueryTestCase());
$test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase());
$test->addTestCase(new Doctrine_BooleanTestCase());
$test->addTestCase(new Doctrine_QueryTestCase());
$test->addTestCase(new Doctrine_EnumTestCase());
$test->addTestCase(new Doctrine_RelationAccessTestCase());
//$test->addTestCase(new Doctrine_RelationAccessTestCase());
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase());