Pivot
  1. Pivot
  2. PIVOT-456

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor 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).

        Activity

        Hide
        Sandro Martini added a comment -

        Greg made a patch (committed yesterday) that solved this.

        Show
        Sandro Martini added a comment - Greg made a patch (committed yesterday) that solved this.
        Hide
        Sandro Martini added a comment -

        Reopening, only to mark it Resolved.

        Show
        Sandro Martini added a comment - Reopening, only to mark it Resolved.
        Hide
        Sandro Martini added a comment -

        Resolved.

        Show
        Sandro Martini added a comment - Resolved.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development