sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatran...@apache.org
Subject git commit: SQOOP-1128: Sqoop2: SqoopException being nested into another SqoopException in Repository
Date Tue, 09 Jul 2013 03:14:21 GMT
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 <venkat@hortonworks.com>
Authored: Mon Jul 8 20:14:08 2013 -0700
Committer: Venkat Ranganathan <venkat@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();


Mime
View raw message