Output more descriptive information when there's no TARGET, TARGET_ARCH, etc defined...
authorjwang36 <jwang36@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 5 Feb 2007 02:02:15 +0000 (02:02 +0000)
committerjwang36 <jwang36@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 5 Feb 2007 02:02:15 +0000 (02:02 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@2351 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java

index 24adfb7..4d9c6de 100644 (file)
@@ -78,7 +78,11 @@ public class ParseParameter {
                 // argstr is "-p ", display current setting\r
                 //\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curpstr);\r
+                    if (curpstr != null) {\r
+                        System.out.printf("%s\n", curpstr);\r
+                    } else {\r
+                        System.out.printf("No ACTIVE_PLATFORM defined \n");\r
+                    }\r
                     return 1;\r
                 }\r
                 //\r
@@ -106,7 +110,11 @@ public class ParseParameter {
                 npflag = true;\r
             } else if (argstr.charAt(1) == 't') {\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curtstr);\r
+                    if (curtstr != null) {\r
+                        System.out.printf("%s\n", curtstr);\r
+                    } else {\r
+                        System.out.printf("No TARGET defined\n");\r
+                    }\r
                     return 1;\r
                 }\r
                 if(argstr.length() < 6 && argstr.charAt(3) == '?'){\r
@@ -122,7 +130,11 @@ public class ParseParameter {
                 ntflag = true;\r
             } else if (argstr.charAt(1) == 'a') {\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curastr);\r
+                    if (curastr != null) {\r
+                        System.out.printf("%s\n", curastr);\r
+                    } else {\r
+                        System.out.printf("No TARGET_ARCH defined\n");\r
+                    }\r
                     return 1;\r
                 }\r
                 if(argstr.length() < 6 && argstr.charAt(3) == '?'){\r
@@ -138,7 +150,11 @@ public class ParseParameter {
                 naflag = true;\r
             } else if (argstr.charAt(1) == 'c') {\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curcstr);\r
+                    if (curcstr != null) {\r
+                        System.out.printf("%s\n", curcstr);\r
+                    } else {\r
+                        System.out.printf("No TOOL_CHAIN_CONF defined\n");\r
+                    }\r
                     return 1;\r
                 }\r
                 if(argstr.length() < 6 && argstr.charAt(3) == '?'){\r
@@ -160,7 +176,11 @@ public class ParseParameter {
                 ncflag = true;\r
             } else if (argstr.charAt(1) == 'n') {\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curnstr);\r
+                    if (curnstr != null) {\r
+                        System.out.printf("%s\n", curnstr);\r
+                    } else {\r
+                        System.out.printf("No TOOL_CHAIN_TAG defined\n");\r
+                    }\r
                     return 1;\r
                 }\r
                 if(argstr.length() < 6 && argstr.charAt(3) == '?'){\r
@@ -176,7 +196,11 @@ public class ParseParameter {
                 nnflag = true;\r
             } else if (argstr.charAt(1) == 'm') {\r
                 if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
-                    System.out.printf("%s\n", curmstr);\r
+                    if (curmstr != null) {\r
+                        System.out.printf("%s\n", curmstr);\r
+                    } else {\r
+                        System.out.printf("No MAX_CONCURRENT_THREAD_NUMBER defined\n");\r
+                    }\r
                     return 1;\r
                 }\r
                 if(argstr.length() < 6 && argstr.charAt(3) == '?'){\r