Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Team:Architecture
Description
Starting with devtoolset-8, gcc-8 warns about catching polymorphic exceptions by value. As far as I understand, this is a bad coding practice in general.
The occurrence I've checked regarding ip_diffim build in afw/math/Statistics.h:115 is harmless, and I'll change it as part of DM-21422.
A list of places to check are grepped and attached.
http://ptgmedia.pearsoncmg.com/images/0321113586/items/sutter_item73.pdf
In file included from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Background.h:34,
|
from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math.h:33,
|
from examples/maskedKernel.cc:2:
|
/software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h: In constructor 'lsst::afw::math::StatisticsControl::StatisticsControl(double, int, lsst::afw::image::MaskPixel, bool, lsst::afw::math::StatisticsControl::WeightsBoolean)':
|
/software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h:115:41: warning: catching polymorphic type 'class lsst::pex::exceptions::InvalidParameterError' by value [-Wcatch-value=]
|
} catch (lsst::pex::exceptions::InvalidParameterError) \{
|
^~~~~~~~~~~~~~~~~~~~~
|
Attachments
Issue Links
- relates to
-
DM-21422 Fix ip_diffim mosaic debug plots broken by Mosaic.makeMosaic signature change and compiler warning
- Done
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | stack_20191001_catch_files.txt [ 40478 ] | |
Attachment | stack_20191001_catch.txt [ 40479 ] |
Attachment | stack_20191001_catch.txt [ 40479 ] |
Attachment | sutter_item73.pdf [ 40481 ] |
Component/s | pex_policy [ 13620 ] | |
Component/s | utils [ 10723 ] |
Labels | PairCoding |
Description |
Starting with devtoolset-8, gcc-8 warns about catching polymorphic exceptions by value. As far as I understand, this is a bad coding practice in general.
The occurrence I've checked regarding ip_diffim build in afw/math/Statistics.h:115 is harmless, and I'll change it as part of A list of places to check are grepped and attached. [http://ptgmedia.pearsoncmg.com/images/0321113586/items/sutter_item73.pdf] {quote}In file included from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Background.h:34, from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math.h:33, from examples/maskedKernel.cc:2: /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h: In constructor 'lsst::afw::math::StatisticsControl::StatisticsControl(double, int, lsst::afw::image::MaskPixel, bool, lsst::afw::math::StatisticsControl::WeightsBoolean)': /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h:115:41: warning: catching polymorphic type 'class lsst::pex::exceptions::InvalidParameterError' by value [-Wcatch-value=] } catch (lsst::pex::exceptions::InvalidParameterError) \{ ^~~~~~~~~~~~~~~~~~~~~ {quote} |
Starting with devtoolset-8, gcc-8 warns about catching polymorphic exceptions by value. As far as I understand, this is a bad coding practice in general.
The occurrence I've checked regarding ip_diffim build in afw/math/Statistics.h:115 is harmless, and I'll change it as part of A list of places to check are grepped and attached. [http://ptgmedia.pearsoncmg.com/images/0321113586/items/sutter_item73.pdf] {code} In file included from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Background.h:34, from /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math.h:33, from examples/maskedKernel.cc:2: /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h: In constructor 'lsst::afw::math::StatisticsControl::StatisticsControl(double, int, lsst::afw::image::MaskPixel, bool, lsst::afw::math::StatisticsControl::WeightsBoolean)': /software/lsstsw/stack_20191001/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0-17-gd2166b6e4/include/lsst/afw/math/Statistics.h:115:41: warning: catching polymorphic type 'class lsst::pex::exceptions::InvalidParameterError' by value [-Wcatch-value=] } catch (lsst::pex::exceptions::InvalidParameterError) \{ ^~~~~~~~~~~~~~~~~~~~~ {code} |
Story Points | 4 |
Epic Link |
|
Team | Alert Production [ 10300 ] |
Story Points | 4 | 2 |
Component/s | cpputils [ 20722 ] | |
Component/s | pex_policy [ 13620 ] | |
Component/s | utils [ 10723 ] |
Assignee | Matthias Wittgen [ wittgen ] |
Status | To Do [ 10001 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10004 ] |
Status | In Review [ 10004 ] | Reviewed [ 10101 ] |
Resolution | Done [ 10000 ] | |
Status | Reviewed [ 10101 ] | Done [ 10002 ] |
Story Points | 2 | 0.5 |
Team | Alert Production [ 10300 ] | Architecture [ 10304 ] |
Watchers | Gabor Kovacs [X], Jim Bosch, Matthias Wittgen, Tim Jenness [ Gabor Kovacs [X], Jim Bosch, Matthias Wittgen, Tim Jenness ] | Jim Bosch, Matthias Wittgen, Tim Jenness [ Jim Bosch, Matthias Wittgen, Tim Jenness ] |
Labels | PairCoding |