* Address i18n related FIXMEs after talk with Brion.
* Tweak message
This commit is contained in:
parent
47f19988d1
commit
e753422480
|
@ -235,7 +235,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
$pkey[] = $key;
|
$pkey[] = $key;
|
||||||
$pval[] = self::valueString($this->$key);
|
$pval[] = self::valueString($this->$key);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new Exception("Unknown key type $key => $type for " . $this->tableName());
|
throw new Exception("Unknown key type $key => $type for " . $this->tableName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
} else if ($type == 'fulltext') {
|
} else if ($type == 'fulltext') {
|
||||||
$search_engine = new MySQLSearch($this, $table);
|
$search_engine = new MySQLSearch($this, $table);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new ServerException('Unknown search type: ' . $type);
|
throw new ServerException('Unknown search type: ' . $type);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -530,7 +530,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
|
|
||||||
if (!$dsn) {
|
if (!$dsn) {
|
||||||
// TRANS: Exception thrown when database name or Data Source Name could not be found.
|
// TRANS: Exception thrown when database name or Data Source Name could not be found.
|
||||||
throw new Exception(_("No database name / DSN found anywhere"));
|
throw new Exception(_("No database name or DSN found anywhere."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $dsn;
|
return $dsn;
|
||||||
|
@ -580,7 +580,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
if ($message instanceof PEAR_Error) {
|
if ($message instanceof PEAR_Error) {
|
||||||
$message = $message->getMessage();
|
$message = $message->getMessage();
|
||||||
}
|
}
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new ServerException("[$id] DB_DataObject error [$type]: $message");
|
throw new ServerException("[$id] DB_DataObject error [$type]: $message");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,11 +623,11 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
case 'sql':
|
case 'sql':
|
||||||
case 'datetime':
|
case 'datetime':
|
||||||
case 'time':
|
case 'time':
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new ServerException("Unhandled DB_DataObject_Cast type passed as cacheKey value: '$v->type'");
|
throw new ServerException("Unhandled DB_DataObject_Cast type passed as cacheKey value: '$v->type'");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new ServerException("Unknown DB_DataObject_Cast type passed as cacheKey value: '$v->type'");
|
throw new ServerException("Unknown DB_DataObject_Cast type passed as cacheKey value: '$v->type'");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ class Safe_DataObject extends DB_DataObject
|
||||||
if ($this->_call($method, $params, $return)) {
|
if ($this->_call($method, $params, $return)) {
|
||||||
return $return;
|
return $return;
|
||||||
} else {
|
} else {
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
throw new Exception('Call to undefined method ' .
|
throw new Exception('Call to undefined method ' .
|
||||||
get_class($this) . '::' . $method);
|
get_class($this) . '::' . $method);
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ class Safe_DataObject extends DB_DataObject
|
||||||
$this->debug("Cant find database schema: {$this->_database}/{$this->__table} \n".
|
$this->debug("Cant find database schema: {$this->_database}/{$this->__table} \n".
|
||||||
"in links file data: " . print_r($_DB_DATAOBJECT['INI'],true),"databaseStructure",5);
|
"in links file data: " . print_r($_DB_DATAOBJECT['INI'],true),"databaseStructure",5);
|
||||||
// we have to die here!! - it causes chaos if we don't (including looping forever!)
|
// we have to die here!! - it causes chaos if we don't (including looping forever!)
|
||||||
// FIXME: i18n?
|
// Low level exception. No need for i18n as discussed with Brion.
|
||||||
$this->raiseError( "Unable to load schema for database and table (turn debugging up to 5 for full error message)", DB_DATAOBJECT_ERROR_INVALIDARGS, PEAR_ERROR_DIE);
|
$this->raiseError( "Unable to load schema for database and table (turn debugging up to 5 for full error message)", DB_DATAOBJECT_ERROR_INVALIDARGS, PEAR_ERROR_DIE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user