Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-764

Exception naming convention

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pex_exceptions
    • Labels:
      None

      Description

      The naming convention for exceptions in pex_exceptions is quite redundant. This issue will make the convention more compact and update all packages that make use of pex_exceptions.

        Attachments

          Activity

          Hide
          ktl Kian-Tat Lim added a comment -

          I took a look at meas_algorithms and meas_astrom as well. Except for trailing whitespace and exceptions derived from std::runtime_error that we might (or might not) want to change now, they look fine to me.

          Show
          ktl Kian-Tat Lim added a comment - I took a look at meas_algorithms and meas_astrom as well. Except for trailing whitespace and exceptions derived from std::runtime_error that we might (or might not) want to change now, they look fine to me.
          Hide
          yusra Yusra AlSayyad added a comment -

          Simple changes to obs_subaru look fine too.

          Show
          yusra Yusra AlSayyad added a comment - Simple changes to obs_subaru look fine too.
          Hide
          jbosch Jim Bosch added a comment -

          Quoting K-T:

          • Since tests/PropertyList.cc and tests/PropertySet_1.cc include pex/exceptions/Runtime.h which defines namespace abbreviation pexExcept, all of the lsst::pex::exceptions:: can be abbreviated. Right now, only some are, which is somewhat disconcerting.

          I think the problem here is that the namespace abbreviation is defined in a header file. I'm pretty sure that violates our code standards.

          Show
          jbosch Jim Bosch added a comment - Quoting K-T: Since tests/PropertyList.cc and tests/PropertySet_1.cc include pex/exceptions/Runtime.h which defines namespace abbreviation pexExcept, all of the lsst::pex::exceptions:: can be abbreviated. Right now, only some are, which is somewhat disconcerting. I think the problem here is that the namespace abbreviation is defined in a header file. I'm pretty sure that violates our code standards.
          Hide
          ktl Kian-Tat Lim added a comment -

          I don't see any specific standard that this would violate. 6 years ago when that line was written, I think the idea was to try to standardize the namespace abbreviations, but that obviously has not taken hold throughout the code base. I'm fine with having all of the exceptions in the cited files being fully-qualified or all of them abbreviated; I'm only complaining about having some of each.

          Show
          ktl Kian-Tat Lim added a comment - I don't see any specific standard that this would violate. 6 years ago when that line was written, I think the idea was to try to standardize the namespace abbreviations, but that obviously has not taken hold throughout the code base. I'm fine with having all of the exceptions in the cited files being fully-qualified or all of them abbreviated; I'm only complaining about having some of each.
          Hide
          rhl Robert Lupton added a comment -

          I think we decided to forbid namespace abbreviations in .h files as they pollute the namespace (although if we had gone with standard ones that wouldn't be so bad).

          I think that we do allow abbreviations in .cc files and encourage people to reopen namespaces where possible.

          Show
          rhl Robert Lupton added a comment - I think we decided to forbid namespace abbreviations in .h files as they pollute the namespace (although if we had gone with standard ones that wouldn't be so bad). I think that we do allow abbreviations in .cc files and encourage people to reopen namespaces where possible.

            People

            • Assignee:
              rowen Russell Owen
              Reporter:
              krughoff Simon Krughoff
              Reviewers:
              Andrew Becker [X] (Inactive), Jim Bosch, Kian-Tat Lim, Paul Price, Perry Gee, Simon Krughoff, Yusra AlSayyad
              Watchers:
              Andrew Becker [X] (Inactive), Jim Bosch, Kian-Tat Lim, Paul Price, Perry Gee, Robert Lupton, Russell Owen, Simon Krughoff, Yusra AlSayyad
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel