+
Skip to content
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
33 changes: 33 additions & 0 deletions docs/contribute/development/api_guideline.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
..
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

Designing API
#############

.. document:: API Guidelines
:id: doc__api_guidelines
:status: draft

User friendly API design
========================

* Each public API shall support the idioms of the programming language it is written in.
* Each public API shall use core infrastructure of its programming language and accompanying standard libraries, whenever possible and meaningful.

Error handling
==============

* (C++) exceptions shall not be used for error handling, as these will be directly leading to an abort and thus reducing availability of the S-CORE platform.
* The best way to deal with errors is to try to resolve those component internally. If not possible the caller of the function shall be notified of the error.
* For (error) returns there is a specific library to be used in S-CORE, it is the Score::Result library which is part of the :ref:`baselibs_feature` feature.
1 change: 1 addition & 0 deletions docs/contribute/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Development
:maxdepth: 1

development_environment
api_guideline
cpp/index
rust/index
python/index
6 changes: 6 additions & 0 deletions docs/platform_management_plan/software_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Design guideline

The design guideline is defined in :need:`PROCESS_doc_concept__imp__concept` and :need:`PROCESS_gd_guidl__implementation`.

API guideline
^^^^^^^^^^^^^

To provide the user with a consistent approach on the use of APIs, there is a guideline documented in :need:`doc__api_guidelines`,
this defines for example the error handling concept or rules to improve user experience.

Coding guideline
^^^^^^^^^^^^^^^^

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载