aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 23:04:56 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-04 23:04:56 +0000
commit869ff426476e28340828d83cf99beb949f908453 (patch)
treeec7947eca2d4560c02165a9bd32b120a07bc17ea
parent8761800b92a6eb4bf3df361091cb85bb8459e959 (diff)
downloadelgg-869ff426476e28340828d83cf99beb949f908453.tar.gz
elgg-869ff426476e28340828d83cf99beb949f908453.tar.bz2
forgot to include language string for previous commit
git-svn-id: http://code.elgg.org/elgg/trunk@7533 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php8
-rw-r--r--languages/en.php1
2 files changed, 6 insertions, 3 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 2184fee41..dcc468cd7 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -88,7 +88,7 @@ function elgg_register_library($name, $location) {
* @param string $name The name of the library
*
* @return void
- * @throws Exception
+ * @throws InvalidParameterException
* @since 1.8.0
*/
function elgg_load_library($name) {
@@ -99,11 +99,13 @@ function elgg_load_library($name) {
}
if (!isset($CONFIG->libraries[$name])) {
- throw new Exception("Failed to load the $name library");
+ $error = elgg_echo('InvalidParameterException:LibraryNotRegistered', array($name));
+ throw new InvalidParameterException($error);
}
if (!include_once($CONFIG->libraries[$name])) {
- throw new Exception("Failed to load the $name library");
+ $error = elgg_echo('InvalidParameterException:LibraryNotRegistered', array($name));
+ throw new InvalidParameterException($error);
}
}
diff --git a/languages/en.php b/languages/en.php
index b1796f51f..6d5ec22b5 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -183,6 +183,7 @@ $english = array(
'InvalidParameterException:DoesNotBelong' => "Does not belong to entity.",
'InvalidParameterException:DoesNotBelongOrRefer' => "Does not belong to entity or refer to entity.",
'InvalidParameterException:MissingParameter' => "Missing parameter, you need to provide a GUID.",
+ 'InvalidParameterException:LibraryNotRegistered' => '%s is not a registered library',
'APIException:ApiResultUnknown' => "API Result is of an unknown type, this should never happen.",
'ConfigurationException:NoSiteID' => "No site ID has been specified.",