OSDN Git Service

エラー時出力メッセージを修正。
[coroid/inqubus.git] / frontend / src / saccubus / converter / Converter.java
index 736fa73..524d547 100644 (file)
@@ -87,21 +87,22 @@ public class Converter extends AbstractCommand implements Runnable {
             sendText("\93®\89æ\81E\83R\83\81\83\93\83g\82ð\95Û\91\82µ\81A\95Ï\8a·\82Í\8ds\82¢\82Ü\82¹\82ñ\82Å\82µ\82½\81B");
             return;
         }
-        if (!videoFile.isFile()) {
-            throw new IOException("\93ü\97Í\93®\89æ\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ:" + videoFile.getPath());
+        // TODO \96{\97\88videoFile\82Ì\8eæ\93¾\8e¸\94s\8e\9e\82Ínull\82Å\82Í\82È\82­IOException\82É\82µ\82½\82¢\82ª...
+        if (videoFile == null || !videoFile.isFile()) {
+            throw new IOException("\93ü\97Í\93®\89æ\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ\81B");
         }
 
         if (Setting.getOutputFileSetting().isAddComment()) {
-            if (!commentFile.isFile()) {
-                throw new IOException("\93ü\97Í\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ:" + commentFile.getPath());
+            if (commentFile == null || !commentFile.isFile()) {
+                throw new IOException("\93ü\97Í\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ\81B");
             }
         } else {
             commentFile = null;
         }
 
         if (Setting.getOutputFileSetting().isAddTcomment()) {
-            if (!tcommFile.isFile()) {
-                throw new IOException("\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ:" + tcommFile.getPath());
+            if (tcommFile == null || !tcommFile.isFile()) {
+                throw new IOException("\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ\81B");
             }
         } else {
             tcommFile = null;