AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Catching polymorphic exception by value

Open
#824 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

## Bug Report

### Incorrect Functionality

```
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp: In static member function ‘static opentime::v1_0::RationalTime opentime::v1_0::RationalTime::from_timecode(const string&, double, opentime::v1_0::ErrorStatus*)’:
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp:110:28: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
110 | } catch(std::exception e) {
| ^
```
```
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp: In static member function ‘static opentime::v1_0::RationalTime opentime::v1_0::RationalTime::from_time_string(const string&, double, opentime::v1_0::ErrorStatus*)’:
/opt/OpenTimelineIO/source/src/opentime/rationalTime.cpp:178:28: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
178 | } catch(std::exception e) {
|
```

Contributor guide

Open the contributing guide

Research direction

Read src/opentime/rationalTime.cpp around lines 110 and 178, where the warnings identify the exception handlers in from_timecode and from_time_string. Build the project and check that these compiler warnings are gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.