summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-03-30 13:18:05 -0700
committerBharat Mediratta <bharat@menalto.com>2010-03-30 13:18:05 -0700
commit7f175ea87e9567817d34729dec83f7f36509b894 (patch)
tree9573fabba5730dbf75c36b40d57a23ff78abed41 /modules/g2_import/helpers
parentd78ea4bc0aaa0e40f54f2ac703fbb690722aac42 (diff)
Move G2_Import_Exception into libraries because it's not a helper class.
Diffstat (limited to 'modules/g2_import/helpers')
-rw-r--r--modules/g2_import/helpers/g2_import.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 456c13c4..575d02bb 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -265,7 +265,7 @@ class g2_import_Core {
$e);
}
}
-
+
break;
case GROUP_ALL_USERS:
@@ -1203,23 +1203,3 @@ function g2() {
return $args;
}
}
-
-/**
- * A wrapper for exceptions to report more details in case
- * it's a ORM validation exception.
- */
-class G2_Import_Exception extends Exception {
- public function __construct($message, Exception $previous=null, $additional_messages=null) {
- if ($additional_messages) {
- $message .= "\n" . implode("\n", $additional_messages);
- }
- if ($previous && $previous instanceof ORM_Validation_Exception) {
- $message .= "\nORM validation errors: " . print_r($previous->validation->errors(), true);
- }
- if ($previous) {
- $message .= "\n" . (string) $previous;
- }
- // The $previous parameter is supported in PHP 5.3.0+.
- parent::__construct($message);
- }
-} \ No newline at end of file