I agree that exception handling is currently not one of the console's strong suits. I have been thinking about introducing a new dojo widget for displaying messages in the console. It would be based on the dialog widget which you can see by clicking the "show dialog" anchor in this page: http://archive.dojotoolkit.org/nightly/tests/widget/test_Dialog.html
The design that you proposed sounds reasonable and would also provide a first step for introducing the message widget described above by wrapping the exceptions and providing a place to display them. I'm in favor of creating a JIRA for this. One question I have is what do you consider life span for an error message? If it only has the duration of a single request/response then it would be lost by the user refreshing the page, clicking the 'help' link, or using the minimize/maximize controls your GERONIMO-795 patch would introduce. Seems like error messages need to be explicitly dismissed by the user. Also, would your approach continue to log the message in the server log or just display it to the user? Best wishes, Paul On 12/1/06, Rakesh Midha <[EMAIL PROTECTED]> wrote:
Hello In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException" I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way. This is what I am proposing for Exception handling in console : 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter. 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace) 3. All Portlet classes should throw ConsoleException instead of PortletException I think this will be nice and cleaner way to handle the console problems. I am working on https://issues.apache.org/jira/browse/GERONIMO-2578 to solve the same problem in deploy new app portlet. Once don't I will supply the patch and open another JIRA to do this activity for all the portlets. Please let me know if I am thinking right or missing something. Your views and comments will be appreciated. Thanks Rakesh
