Merge lp:~manishsinha/wadlsharp/fix-646389 into lp:wadlsharp

Status: Merged
Merged at revision: 20
Proposed branch: lp:~manishsinha/wadlsharp/fix-646389
Merge into: lp:wadlsharp
Prerequisite: lp:~manishsinha/wadlsharp/fix-645173
Diff against target: 60 lines (+33/-1)
1 file modified
WadlConsole/Program.cs (+33/-1)
To merge this branch: bzr merge lp:~manishsinha/wadlsharp/fix-646389
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+36906@code.launchpad.net

Commit message

Fixed the Wadlconsole in which the error message was unhelpful in telling the user which option they were missing
Fixed bug #646389

Description of the change

Fixed the Wadlconsole in which the error message was unhelpful in telling the user which option they were missing
Fixed bug #646389

To post a comment you must log in.
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'WadlConsole/Program.cs'
2--- WadlConsole/Program.cs 2010-09-28 18:32:46 +0000
3+++ WadlConsole/Program.cs 2010-09-28 18:32:46 +0000
4@@ -156,23 +156,55 @@
5 input = GetWadlFile(input);
6 }
7
8+ #region Validate the Inputs
9+
10 try
11 {
12 // validate the args that were passed to the command line
13 ValidateArgs.Begin()
14 .IsNotNullOrEmpty(input, "input")
15+ .Check();
16+
17+ }catch(ValidationException e)
18+ {
19+ Console.Write("wadl-sharp: ");
20+ Console.WriteLine(" The input filename is not provided");
21+ Console.WriteLine(Resources.TryHelp);
22+ Environment.Exit(1);
23+ }
24+
25+ try
26+ {
27+ // validate the args that were passed to the command line
28+ ValidateArgs.Begin()
29 .PathExists(input, "input")
30+ .Check();
31+
32+ }catch(ValidationException e)
33+ {
34+ Console.Write("wadl-sharp: ");
35+ Console.WriteLine(" The provided input file does not exist");
36+ Console.WriteLine(Resources.TryHelp);
37+ Environment.Exit(1);
38+ }
39+
40+ try
41+ {
42+ // validate the args that were passed to the command line
43+ ValidateArgs.Begin()
44 .IsNotNullOrEmpty(rootNamespace, "namespace")
45 .Check();
46
47 }catch(ValidationException e)
48 {
49 Console.Write("wadl-sharp: ");
50- Console.WriteLine(e.Message);
51+ Console.WriteLine(" Either the namespace option is not provided or the provided namespace is null or empty. Use the -n option");
52 Console.WriteLine(Resources.TryHelp);
53 Environment.Exit(1);
54 }
55
56+ #endregion
57+
58 // if we did recive an output file it means that the user wanted all the code
59 // in a single file, otherwhise it will be a collection
60 if(outputFile == null)

Subscribers

People subscribed via source and target branches