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 <[email protected]> Authored: Mon Jul 8 20:14:08 2013 -0700 Committer: Venkat Ranganathan <[email protected]> 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();
