Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify that try-catch blocks are forbidden in cpp_usage_guidelines.rst #10483

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ repetition:
It's recommended to use ``GLOBAL_DEF``/``EDITOR_DEF`` only once per setting and
use ``GLOBAL_GET``/``EDITOR_GET`` in all other places where it's referenced.

.. _doc_common_engine_methods_and_macros_error_macros:

Error macros
------------

Expand Down
9 changes: 9 additions & 0 deletions contributing/development/cpp_usage_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ pull request.
To follow the existing style, please use standard ``#ifdef``-based include
guards instead of ``#pragma once`` in new files.

``try``-``catch`` blocks
~~~~~~~~~~~~~~~~~~~~~~~~

C++ style exception handling using ``try`` and ``catch`` blocks is forbidden.
nikitalita marked this conversation as resolved.
Show resolved Hide resolved
This restriction is in place for several reasons, including performance, binary
size and code complexity.
Use :ref:`doc_common_engine_methods_and_macros_error_macros` instead.


.. seealso::

See :ref:`doc_code_style_guidelines_header_includes` for guidelines on sorting
Expand Down
Loading