aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-05 12:52:13 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-05 12:52:13 +0000
commitc949e085c33b6eaf2e1dda4add566d47ab1876cd (patch)
tree648f4d1fd9e1565aeae53c40ae883570fe16963f /engine/lib/relationships.php
parent152405d1b34b8ba1a27b288eba53bb29ed2bf228 (diff)
downloadelgg-c949e085c33b6eaf2e1dda4add566d47ab1876cd.tar.gz
elgg-c949e085c33b6eaf2e1dda4add566d47ab1876cd.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Partial internationalisation of exceptions git-svn-id: https://code.elgg.org/elgg/trunk@801 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r--engine/lib/relationships.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index b5d5816a1..3f053460a 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -94,7 +94,7 @@
}
$this->id = add_entity_relationship($this->guid_one, $this->relationship, $this->guid_two);
- if (!$this->id) throw new IOException("Unable to save new ElggAnnotation");
+ if (!$this->id) throw new IOException(sprintf(elgg_new('IOException:UnableToSaveNew'), get_class()));
return $this->id;
@@ -137,7 +137,7 @@
public function import(ODD $data)
{
if (!($element instanceof ODDRelationship))
- throw new InvalidParameterException("ElggRelationship::import() passed an unexpected ODD class");
+ throw new InvalidParameterException(elgg_echo('InvalidParameterException:UnexpectedODDClass'));
$uuid_one = $data->getAttribute('uuid1');
$uuid_two = $data->getAttribute('uuid2');
@@ -162,7 +162,7 @@
// save
$result = $this->save();
if (!$result)
- throw new ImportException("There was a problem saving the ElggExtender");
+ throw new ImportException(sprintf(elgg_echo('ImportException:ProblemSaving'), get_class()));
return $this;
}
@@ -576,10 +576,10 @@
// Sanity check values
if ((!is_array($params)) && (!isset($params['guid'])))
- throw new InvalidParameterException("GUID has not been specified during export, this should never happen.");
+ throw new InvalidParameterException(elgg_echo('InvalidParameterException:GUIDNotForExport'));
if (!is_array($returnvalue))
- throw new InvalidParameterException("Entity serialisation function passed a non-array returnvalue parameter");
+ throw new InvalidParameterException(elgg_echo('InvalidParameterException:NonArrayReturnValue'));
$guid = (int)$params['guid'];