[logaling-commit] logaling/logaling-command [master] Raise error if target-language missing

Back to archive index

SUZUKI Miho null+****@clear*****
Thu Aug 9 15:44:53 JST 2012


SUZUKI Miho	2012-08-09 15:44:53 +0900 (Thu, 09 Aug 2012)

  New Revision: 66dc5cefdcb75bdfd39d9360f2b1660ce5037768
  https://github.com/logaling/logaling-command/commit/66dc5cefdcb75bdfd39d9360f2b1660ce5037768

  Merged 3c178f5: Merge pull request #74 from logaling/loga-new-no-project

  Log:
    Raise error if target-language missing

  Modified files:
    lib/logaling/command/application.rb

  Modified: lib/logaling/command/application.rb (+3 -1)
===================================================================
--- lib/logaling/command/application.rb    2012-08-09 15:23:20 +0900 (a008f7f)
+++ lib/logaling/command/application.rb    2012-08-09 15:44:53 +0900 (72ea0b5)
@@ -85,9 +85,11 @@ module Logaling::Command
           say "#{logaling_config_path} already exists."
         end
       else
-        # raise error if target is nil 
+        raise Logaling::CommandFailed, "[TARGET-LANGUAGE] is required when you use '--personal'" unless target_language
         @repository.create_personal_glossary(project_name, source_language, target_language)
       end
+    rescue Logaling::CommandFailed => e
+      say e.message
     end
 
     desc 'import', 'Import external glossary'
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Back to archive index