Uploaded image for project: 'Commons SCXML'
  1. Commons SCXML
  2. SCXML-103

Remove any catch (Throwable t) occurences

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.10, 2.0
    • None

    Description

      There are a few instances where the code catches Throwable, but fails to rethrow anything.
      For example:

      org.apache.commons.scxml.io.SCXMLSerializer.getTransformer()
      ...
              } catch (Throwable t) {
                  return null;
              }
      

      It would be safer if the code only caught the relevant Exception(s) (and perhaps some Errors).
      For example does it really make sense to catch OutOfMemory ?

      In particular, the Javadoc for ThreadDeath says:

      If ThreadDeath is caught by a method, it is important that it be rethrown so that the thread actually dies.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: