Uploaded image for project: 'Magnolia Shop'
  1. Magnolia Shop
  2. MSHOP-130

DefaultCustomDataAccesor#getNodeByName should not throw java.lang.Exception but a subclass

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.1.5, 2.0.1
    • Labels:
      None

      Description

      The problem with this is that we end up having to catch java.lang.Exception all over our code. Simply because this method in the Magnolia Shop throws it. And therefore all methods that use it (quite a lot).

      I think it is bad practice to throw java.lang.Exception. You should always throw a specific subclass so that you (and we) can implement good exception handling.

      In general I think the exception handling in the shop module could be improved here and there but this is the most annoying one for us I guess.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            edgar Edgar Vonk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: