Skip to content

Commit

Permalink
Specify that try-catch blocks are forbidden in cpp_usage_guidelines.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita committed Jan 9, 2025
1 parent 5639d1a commit b238469
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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.
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

0 comments on commit b238469

Please sign in to comment.