Changeset 2671


Ignore:
Timestamp:
5/24/2012 8:09:52 AM (3 years ago)
Author:
lowjoel
Message:

Don't crash when the user enters an invalid action on the command line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser/Program.ConsoleProgram.cs

    r2516 r2671  
    100100            public void Run() 
    101101            { 
     102                //Check that we've got an action corresponding to one the user requested. 
     103                if (!Handlers.ContainsKey(Arguments.Action)) 
     104                    throw new ArgumentException(S._("Unknown action {0}", Arguments.Action)); 
     105 
    102106                //Re-parse the command line arguments as arguments for the given action. 
    103107                ConsoleActionData data = Handlers[Arguments.Action]; 
Note: See TracChangeset for help on using the changeset viewer.