You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Antony Stubbs (JIRA)" <ji...@apache.org> on 2008/10/31 17:57:44 UTC

[jira] Created: (PLUTO-519) Better error msg on invalid event payload class

Better error msg on invalid event payload class
-----------------------------------------------

                 Key: PLUTO-519
                 URL: https://issues.apache.org/jira/browse/PLUTO-519
             Project: Pluto
          Issue Type: Improvement
          Components: portal driver
    Affects Versions: 2.0.0
            Reporter: Antony Stubbs
            Priority: Minor


pretty self explanatory, see the patch

{code}
--- 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 {
{code}

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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PLUTO-519) Better error msg on invalid event payload class

Posted by "Antony Stubbs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antony Stubbs updated PLUTO-519:
--------------------------------

    Attachment: Error-msg.patch

> Better error msg on invalid event payload class
> -----------------------------------------------
>
>                 Key: PLUTO-519
>                 URL: https://issues.apache.org/jira/browse/PLUTO-519
>             Project: Pluto
>          Issue Type: Improvement
>          Components: portal driver
>    Affects Versions: 2.0.0
>            Reporter: Antony Stubbs
>            Priority: Minor
>         Attachments: Error-msg.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> pretty self explanatory, see the patch
> {code}
> --- 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 {
> {code}
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PLUTO-519) Better error msg on invalid event payload class

Posted by "Ate Douma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved PLUTO-519.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
         Assignee: Ate Douma

Patch applied, thanks Antony

> Better error msg on invalid event payload class
> -----------------------------------------------
>
>                 Key: PLUTO-519
>                 URL: https://issues.apache.org/jira/browse/PLUTO-519
>             Project: Pluto
>          Issue Type: Improvement
>          Components: portal driver
>    Affects Versions: 2.0.0
>            Reporter: Antony Stubbs
>            Assignee: Ate Douma
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: Error-msg.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> pretty self explanatory, see the patch
> {code}
> --- 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 {
> {code}
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.