Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 190
    • Issues 190
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !792

COMP: Catch bad_any_cast by reference, not value

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Laurențiu Nicola requested to merge bad-any-cast into develop Feb 11, 2021
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 1

Summary

Catch the exception by reference, not value.

Rationale

Exceptions caught by value are sliced, and this silences a warning.

Additional notes

Split off !786 (merged). Sorry for the tiny PRs, but it's hard for me to understand the CI error from there.

Copyright

The copyright owner is Laurențiu Nicola (CS ROMANIA) and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Edited Feb 11, 2021 by Laurențiu Nicola
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: bad-any-cast