You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ve...@apache.org on 2013/07/09 05:14:21 UTC

git commit: SQOOP-1128: Sqoop2: SqoopException being nested into another SqoopException in Repository

Updated Branches:
  refs/heads/sqoop2 96a02dfee -> 251c8334f


SQOOP-1128: Sqoop2: SqoopException being nested into another SqoopException in Repository

(Mengwei Ding via Venkat Ranganathan)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/251c8334
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/251c8334
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/251c8334

Branch: refs/heads/sqoop2
Commit: 251c8334fa16470a124b133dd95cec6ccdf242fa
Parents: 96a02df
Author: Venkat Ranganathan <ve...@hortonworks.com>
Authored: Mon Jul 8 20:14:08 2013 -0700
Committer: Venkat Ranganathan <ve...@hortonworks.com>
Committed: Mon Jul 8 20:14:08 2013 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/sqoop/repository/Repository.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/251c8334/core/src/main/java/org/apache/sqoop/repository/Repository.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/repository/Repository.java b/core/src/main/java/org/apache/sqoop/repository/Repository.java
index 0bedcbb..92e11d2 100644
--- a/core/src/main/java/org/apache/sqoop/repository/Repository.java
+++ b/core/src/main/java/org/apache/sqoop/repository/Repository.java
@@ -464,6 +464,11 @@ public abstract class Repository {
 
         throw new SqoopException(RepositoryError.JDBCREPO_0027, msg);
       }
+    } catch (SqoopException ex) {
+      if(tx != null) {
+        tx.rollback();
+      }
+      throw ex;
     } catch (Exception ex) {
       if(tx != null) {
         tx.rollback();
@@ -558,6 +563,11 @@ public abstract class Repository {
 
         throw new SqoopException(RepositoryError.JDBCREPO_0027, msg);
       }
+    } catch (SqoopException ex) {
+      if(tx != null) {
+        tx.rollback();
+      }
+      throw ex;
     } catch (Exception ex) {
       if(tx != null) {
         tx.rollback();