Skip to content

Qt: Allow to build without exceptions enabled#35

Merged
TheOneRing merged 1 commit intomainfrom
work/no_throw
Mar 4, 2022
Merged

Qt: Allow to build without exceptions enabled#35
TheOneRing merged 1 commit intomainfrom
work/no_throw

Conversation

@TheOneRing
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@dschmidt dschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum ... exceptions are catchable, this isn't ... can we return an error instead?

@TheOneRing
Copy link
Copy Markdown
Contributor Author

Hum ... exceptions are catchable, this isn't ... can we return an error instead?

We could, however the issue occurs in code we don't even use, it the client code I'd like to get rid of.
This is the only throw in the code -> no one expects a throw here, we would crash anyhow.
This changes fixes a build issue if we build the code with the KDE settings(as part of the owncloud client itself), which disable exceptions by default.
(Exceptions can mess with Qt)

src/libsync/libregraphapisrc-src/client/OAIServerConfiguration.h:61:21: error: cannot use 'throw' with exceptions disabled
                    throw std::runtime_error(QString("The variable " + name + " in the server URL has invalid value " + value + ".").toUtf8());

@dschmidt
Copy link
Copy Markdown
Member

dschmidt commented Mar 4, 2022

yeah ... well ...

@TheOneRing TheOneRing merged commit 3471dbb into main Mar 4, 2022
@delete-merged-branch delete-merged-branch Bot deleted the work/no_throw branch March 4, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants