Skip to content

Commit 507a349

Browse files
committed
Change RuntimeException to ConfigException
1 parent 7e5534d commit 507a349

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/embulk/output/sftp/SftpFileOutput.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.apache.commons.vfs2.impl.StandardFileSystemManager;
88
import org.apache.commons.vfs2.provider.sftp.IdentityInfo;
99
import org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder;
10+
import org.embulk.config.ConfigException;
1011
import org.embulk.config.TaskReport;
1112
import org.embulk.spi.Buffer;
1213
import org.embulk.spi.Exec;
@@ -56,7 +57,7 @@ private StandardFileSystemManager initializeStandardFileSystemManager()
5657
}
5758
catch (FileSystemException e) {
5859
logger.error(e.getMessage());
59-
throw new RuntimeException(e);
60+
throw new ConfigException(e);
6061
}
6162

6263
return manager;
@@ -87,7 +88,7 @@ private FileSystemOptions initializeFsOptions(PluginTask task)
8788
}
8889
catch (FileSystemException e) {
8990
logger.error(e.getMessage());
90-
throw new RuntimeException(e);
91+
throw new ConfigException(e);
9192
}
9293

9394
return fsOptions;
@@ -196,7 +197,7 @@ private URI getSftpFileUri(String remoteFilePath)
196197
}
197198
catch (URISyntaxException e) {
198199
logger.error(e.getMessage());
199-
throw new RuntimeException(e);
200+
throw new ConfigException(e);
200201
}
201202
}
202203

0 commit comments

Comments
 (0)