Pluto
  1. Pluto
  2. PLUTO-519

Better error msg on invalid event payload class

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: portal driver
    • Labels:
      None

      Description

      pretty self explanatory, see the patch

      --- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
      +++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
      @@ -155,7 +155,9 @@ public class EventProviderImpl implements org.apache.pluto.spi.EventProvider,
      
                              if (value != null && !isValueInstanceOfDefinedClass(qname, value))
                                      throw new IllegalArgumentException(
      -                                               "Payload has not the right class");
      +                                               "Payload class (" +
      +                                       value.getClass().getCanonicalName() +
      +                                       ") does not have right class, check your defined event types in portlet.xml.");
      
                              try {
      

      It would be better to list out the allowed types, but that's a little more code than this, and it'll point the user in the right direction.

      1. Error-msg.patch
        0.9 kB
        Antony Stubbs

        Activity

        Antony Stubbs created issue -
        Antony Stubbs made changes -
        Field Original Value New Value
        Attachment Error-msg.patch [ 12393162 ]
        Hide
        Ate Douma added a comment -

        Patch applied, thanks Antony

        Show
        Ate Douma added a comment - Patch applied, thanks Antony
        Ate Douma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Ate Douma [ adouma ]
        Fix Version/s 2.0.0 [ 12312914 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12445408 ] Default workflow, editable Closed status [ 12565090 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565090 ] jira [ 12585893 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        157d 9h 40m 1 Ate Douma 07/Apr/09 02:38

          People

          • Assignee:
            Ate Douma
            Reporter:
            Antony Stubbs
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development