MyFaces Core
  1. MyFaces Core
  2. MYFACES-3053 Improve error reporting and logging
  3. MYFACES-3221

Create and use structure for facelets Location and TagAttribute-aware exceptions

    Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      This can be considered as continuation of MYFACES-3202. Implements requirement "any time there is an error the user should see not just a cryptic stack trace, but the EL expression that was being evaluated - including the part of the EL expression that triggered the problem"

      Example:
      <f:actionListener type="com.foo.Bazz" /> is represented as org.apache.myfaces.view.facelets.tag.jsf.core.ValueChangeListenerHandler.LazyValueChangeListener instance. But if look in code, you see simple valueChangeListener.processValueChange(event); without try catch. If exception occurs, no facelets Location or TagAttribute context is available and therefore exception handling mechanism is not able to output info about problematic XML tag.

      Use types created as part of MYFACES-3202 (ContextAware, LocationAware .. ); create something like ExecuteTemplate and ExecuteCallback and perform all operation with proper context.

      1. MYFACES-3221.patch
        13 kB
        Martin Kočí
      2. MYFACES-3221-draft.patch
        11 kB
        Martin Kočí

        Activity

        Martin Kočí created issue -
        Martin Kočí made changes -
        Field Original Value New Value
        Component/s General [ 12310160 ]
        Hide
        Martin Kočí added a comment -

        Please take a look in MYFACES-3221-draft.patch what I have in mind.

        Show
        Martin Kočí added a comment - Please take a look in MYFACES-3221 -draft.patch what I have in mind.
        Martin Kočí made changes -
        Attachment MYFACES-3221-draft.patch [ 12486452 ]
        Martin Kočí made changes -
        Description This can be considered as continuation of MYFACES-3202.

        Example:
        <f:actionListener type="com.foo.Bazz" /> is represented as org.apache.myfaces.view.facelets.tag.jsf.core.ValueChangeListenerHandler.LazyValueChangeListener instance. But if look in code, you see simple valueChangeListener.processValueChange(event); without try catch. If exception occurs, no facelets Location or TagAttribute context is available and therefore exception handling mechanism is not able to output info about problematic XML tag.


        Use types created as part of MYFACES-3202 (ContextAware, LocationAware .. ); create something like ExecuteTemplate and ExecuteCallback and perform all operation with proper context.
        This can be considered as continuation of MYFACES-3202. Implements requirement "any time there is an error the user should see not just a cryptic stack trace, but the EL expression that was being evaluated - including the part of the EL expression that triggered the problem"

        Example:
        <f:actionListener type="com.foo.Bazz" /> is represented as org.apache.myfaces.view.facelets.tag.jsf.core.ValueChangeListenerHandler.LazyValueChangeListener instance. But if look in code, you see simple valueChangeListener.processValueChange(event); without try catch. If exception occurs, no facelets Location or TagAttribute context is available and therefore exception handling mechanism is not able to output info about problematic XML tag.


        Use types created as part of MYFACES-3202 (ContextAware, LocationAware .. ); create something like ExecuteTemplate and ExecuteCallback and perform all operation with proper context.
        Martin Kočí made changes -
        Attachment MYFACES-3221.patch [ 12487588 ]
        Hide
        Leonardo Uribe added a comment -

        Looks good. Maybe the additional object creation cause a performance hit, but is justified, so we can ignore it.

        Show
        Leonardo Uribe added a comment - Looks good. Maybe the additional object creation cause a performance hit, but is justified, so we can ignore it.

          People

          • Assignee:
            Martin Kočí
            Reporter:
            Martin Kočí
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development