Skip to content

Commit

Permalink
throwing TaskExecutionException doesn't need buildExceptionErrorConfi…
Browse files Browse the repository at this point in the history
…g any more
  • Loading branch information
frsyuki committed Jan 6, 2017
1 parent 3da24c2 commit f8babb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.List;
import java.util.UUID;

import static io.digdag.spi.TaskExecutionException.buildExceptionErrorConfig;
import static io.digdag.standards.operator.state.PollingRetryExecutor.pollingRetryExecutor;

abstract class BaseRedshiftLoadOperator<T extends RedshiftConnection.StatementConfig>
Expand Down Expand Up @@ -218,7 +217,7 @@ private void executeTask(Config params, RedshiftConnectionConfig connectionConfi
catch (DatabaseException ex) {
// expected error that should suppress stacktrace by default
String message = String.format("%s [%s]", ex.getMessage(), ex.getCause().getMessage());
throw new TaskExecutionException(message, buildExceptionErrorConfig(ex));
throw new TaskExecutionException(message, ex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import java.util.List;
import java.util.Map;

import static io.digdag.spi.TaskExecutionException.buildExceptionErrorConfig;

public class RedshiftLoadOperatorFactory
implements OperatorFactory
{
Expand Down Expand Up @@ -160,7 +158,7 @@ protected List<AcceptableUri> buildAcceptableUriForSessionCredentials(Config con
}
catch (RetryExecutor.RetryGiveupException e) {
throw new TaskExecutionException(
"Failed to fetch a manifest file: " + from, buildExceptionErrorConfig(e));
"Failed to fetch a manifest file: " + from, e);
}
}
return builder.build();
Expand Down

0 comments on commit f8babb6

Please sign in to comment.