Enhance Messages (and make them not blocking) when wrong Startup Properties are 
given to DesktopApplicationContext
------------------------------------------------------------------------------------------------------------------

                 Key: PIVOT-456
                 URL: https://issues.apache.org/jira/browse/PIVOT-456
             Project: Pivot
          Issue Type: Improvement
          Components: wtk
    Affects Versions: 1.4
            Reporter: Sandro Martini
            Assignee: Sandro Martini
            Priority: Minor
             Fix For: 1.5


To better understand what happen in case a wrong startup argument is passed to 
the command line, enhance the generated message, displaying also the wrong 
argument.

And, make this no more a blocking error, so instead of generating an 
IllegalArgumentException, print a message to System.err to let the application 
run.

For example, this is the current behavior (or better, was this up to yesterday):
13-apr-2010 12.01.23 - Scala Application Started (main class 
scavot.experiments.scala_use_pivot.HelloJavaApp)
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:151)
        at 
org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
Caused by: java.lang.IllegalArgumentException: Startup property names must 
begin with "--".
        at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
        at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
        at 
scavot.experiments.scala_use_pivot.HelloJavaApp$.main(HelloJavaApp.scala:15)
        at 
scavot.experiments.scala_use_pivot.HelloJavaApp.main(HelloJavaApp.scala)
        ... 6 more

and the application was closed (the error was blocking, without further detail 
on the wrong argument, and in my case this was difficult to understand because 
i was using Maven to handle the project and to make the application run, and 
the wrong argument was given by maven).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to