Changeset 745 for xmlTools/trunk/posUpdate/Program.cs
- Timestamp:
- Mar 26, 2013, 4:04:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xmlTools/trunk/posUpdate/Program.cs
r743 r745 11 11 class Program 12 12 { 13 public static readonly string toolsVersion = "0.8a"; 13 public static readonly string toolsVersion = "0.8b"; 14 private static appErrors lastError; 14 15 15 16 public enum appErrors 16 17 { 17 // 0-19 Errors with input parameters18 ERROR_PARAMS = 0,19 FILE_NOT_FOUND = 1,20 ELEMENT_NOT_SPECIFIED= 2,21 ELEMENT_NOT_FOUND= 3,18 // 1-19 Errors with input parameters 19 ERROR_PARAMS = 1, 20 FILE_NOT_FOUND = 2, 21 ELEMENT_NOT_SPECIFIED=3, 22 ELEMENT_NOT_FOUND=4, 22 23 // 20-199 General application errors 23 24 BACKUPS_ALREADY_EXISTS=20, … … 36 37 Console.Error.WriteLine("Error Code: "+(int)error); 37 38 Console.Error.WriteLine(description); 38 39 39 40 if (exitApp) 40 41 { 41 42 Environment.Exit(1); 42 43 } 44 45 lastError = error; 43 46 } 44 47 45 public static voidMain(string[] args)48 public static int Main(string[] args) 46 49 { 47 50 try … … 49 52 //We use a command parse library due to its advantages 50 53 CLAP.Parser.RunConsole<ParametersParser>(args); 54 return (int)lastError; 51 55 } 52 56 catch (Exception e) 53 57 { 54 58 printAppError(appErrors.ERROR_PARAMS, "Error processing parameters:\n" + e.ToString()); 59 return (int)appErrors.ERROR_PARAMS; 55 60 } 56 61 }
Note:
See TracChangeset
for help on using the changeset viewer.