[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-1280) JBoss Tools JSP Editor does not process some problems in vpe templates in a user friendly way

Sergey Vasilyev (JIRA) jira-events at lists.jboss.org
Wed Feb 13 10:47:26 EST 2008


     [ http://jira.jboss.com/jira/browse/JBIDE-1280?page=all ]

Sergey Vasilyev updated JBIDE-1280:
-----------------------------------

    Description: 
1. provide an incorrect vpe expression in some vpe template.
(I used <span title="{tagstring()|tagstring()}" /> instead of <span title="{tagstring()}" /> 
for standard jsf tag templates in vpe-templates-jsf.xml).
2. prepare jsp file that uses the corrupted template.
3. open jsp file with JBoss Tools JSP Editor.
Result: blank visual editor and empty Eclipse log. 
4. Select Preview tab
Result: tab is empty and log contains Error

org.jboss.tools.vpe.editor.template.expression.VpeExpressionError: Error of type conversion
	at org.jboss.tools.vpe.editor.template.expression.VpeValue.or(VpeValue.java:94)
	at org.jboss.tools.vpe.editor.template.expression.VpeOrOperation.exec(VpeOrOperation.java:26)
	at org.jboss.tools.vpe.editor.template.VpeAttributeCreator.create(VpeAttributeCreator.java:54)

The Error is caught by Workbench.

The question is: why most problems in vpe expressions throw VpeExpressionBuilderException 
and some problems throw VpeExpressionError (which extends java.lang.Error)?

Comment to java.lang.Error says that 
"An Error is a subclass of Throwable that indicates serious problems 
that a reasonable application should not try to catch"

As shown above, in cases when Studio does not catch VpeExpressionError, user has no idea what is wrong, 
and in cases when Eclipse catches it, it would be more proper to use something like 
VpeExpressionExecException extending Exception rather than Error.

Solution:
I think we should create VpeExpressionException that extends RuntimeException. Templates it is a part of VPE functionality and doesn't have any user input. And we will have all of template's bugs caught.


  was:
1. provide an incorrect vpe expression in some vpe template.
(I used <span title="{tagstring()|tagstring()}" /> instead of <span title="{tagstring()}" /> 
for standard jsf tag templates in vpe-templates-jsf.xml).
2. prepare jsp file that uses the corrupted template.
3. open jsp file with JBoss Tools JSP Editor.
Result: blank visual editor and empty Eclipse log. 
4. Select Preview tab
Result: tab is empty and log contains Error

org.jboss.tools.vpe.editor.template.expression.VpeExpressionError: Error of type conversion
	at org.jboss.tools.vpe.editor.template.expression.VpeValue.or(VpeValue.java:94)
	at org.jboss.tools.vpe.editor.template.expression.VpeOrOperation.exec(VpeOrOperation.java:26)
	at org.jboss.tools.vpe.editor.template.VpeAttributeCreator.create(VpeAttributeCreator.java:54)

The Error is caught by Workbench.

The question is: why most problems in vpe expressions throw VpeExpressionBuilderException 
and some problems throw VpeExpressionError (which extends java.lang.Error)?

Comment to java.lang.Error says that 
"An Error is a subclass of Throwable that indicates serious problems 
that a reasonable application should not try to catch"

As shown above, in cases when Studio does not catch VpeExpressionError, user has no idea what is wrong, 
and in cases when Eclipse catches it, it would be more proper to use something like 
VpeExpressionExecException extending Exception rather than Error.



> JBoss Tools JSP Editor does not process some problems in vpe templates in a user friendly way
> ---------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-1280
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1280
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Visual Page Editor
>    Affects Versions: 2.0.0.Beta4
>            Reporter: Viacheslav Kabanovich
>         Assigned To: Sergey Vasilyev
>            Priority: Critical
>             Fix For: 2.1
>
>
> 1. provide an incorrect vpe expression in some vpe template.
> (I used <span title="{tagstring()|tagstring()}" /> instead of <span title="{tagstring()}" /> 
> for standard jsf tag templates in vpe-templates-jsf.xml).
> 2. prepare jsp file that uses the corrupted template.
> 3. open jsp file with JBoss Tools JSP Editor.
> Result: blank visual editor and empty Eclipse log. 
> 4. Select Preview tab
> Result: tab is empty and log contains Error
> org.jboss.tools.vpe.editor.template.expression.VpeExpressionError: Error of type conversion
> 	at org.jboss.tools.vpe.editor.template.expression.VpeValue.or(VpeValue.java:94)
> 	at org.jboss.tools.vpe.editor.template.expression.VpeOrOperation.exec(VpeOrOperation.java:26)
> 	at org.jboss.tools.vpe.editor.template.VpeAttributeCreator.create(VpeAttributeCreator.java:54)
> The Error is caught by Workbench.
> The question is: why most problems in vpe expressions throw VpeExpressionBuilderException 
> and some problems throw VpeExpressionError (which extends java.lang.Error)?
> Comment to java.lang.Error says that 
> "An Error is a subclass of Throwable that indicates serious problems 
> that a reasonable application should not try to catch"
> As shown above, in cases when Studio does not catch VpeExpressionError, user has no idea what is wrong, 
> and in cases when Eclipse catches it, it would be more proper to use something like 
> VpeExpressionExecException extending Exception rather than Error.
> Solution:
> I think we should create VpeExpressionException that extends RuntimeException. Templates it is a part of VPE functionality and doesn't have any user input. And we will have all of template's bugs caught.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list