Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-456

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: wtk
    • Labels:
      None

      Description

      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).

        Attachments

          Activity

            People

            • Assignee:
              smartini Sandro Martini
              Reporter:
              smartini Sandro Martini
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: