You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(api): separate `errors::make` and `errors::nil` from `errors::Error`
* docs(api): link classes and functions to the API docs
* docs(api): update the API documentation of `errors::Error` class
* docs(api): update the API documentation of `errors::Error::message` method
* docs(api): update the API documentation of `errors::Error::operator bool` method
* docs(api): update the API documentation of `errors::operator<<` method
* docs(api): update the API documentation of `errors::make` function
* docs(api): update the API documentation of `errors::nil` function
* docs(api): update the API documentation of `errors::format` function
Copy file name to clipboardExpand all lines: docs/index.rst
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ Errors C++
2
2
=============
3
3
4
4
Errors C++ is a `C++`_ package that provides utilities for error handling.
5
-
This package mainly consists of the `errors::Error` class, representing an object that may contain an error.
5
+
This package mainly consists of the :cpp:class:`errors::Error` class, representing an object that may contain an error.
6
6
7
7
This package serves as an alternative to error handling using `try-catch exceptions`_, commonly found in C++ code.
8
8
It facilitates error handling by returning values, following the style of `Go's error handling`_.
@@ -16,9 +16,9 @@ Key Features
16
16
17
17
This package provides the following key features:
18
18
19
-
- Error handling in the style of Go by returning an `errors::Error`.
20
-
- Support for creating errors in the style of `fmtlib`_ using `errors::format`.
21
-
- Direct printing of `errors::Error` using C++ streams and fmtlib.
19
+
- Error handling in the style of Go by returning an :cpp:class:`errors::Error`.
20
+
- Support for creating errors in the style of `fmtlib`_ using :cpp:func:`errors::format`.
21
+
- Direct printing of :cpp:class:`errors::Error` using C++ streams and fmtlib.
22
22
23
23
.. _fmtlib: https://github.com/fmtlib/fmt
24
24
@@ -58,7 +58,7 @@ Alternatively, you can also integrate this package using `CPM.cmake`_:
58
58
Usage
59
59
-----
60
60
61
-
This package contains an `errors::Error` class, which represents an error object.
61
+
This package contains an :cpp:class:`errors::Error` class, which represents an error object.
62
62
Functions that may produce errors should return this object so that the error can be handled properly.
63
63
64
64
.. code-block:: cpp
@@ -74,7 +74,7 @@ Functions that may produce errors should return this object so that the error ca
74
74
// Continue processing if no error.
75
75
}
76
76
77
-
For functions returning `errors::Error`, use `errors::nil` function to signify no error or return an error object created from the `errors::make` function.
77
+
For functions returning :cpp:class:`errors::Error`, use :cpp:func:`errors::nil` function to signify no error or return an error object created from the :cpp:func:`errors::make` function.
78
78
79
79
.. code-block:: cpp
80
80
@@ -89,7 +89,7 @@ For functions returning `errors::Error`, use `errors::nil` function to signify n
89
89
return errors::nil();
90
90
}
91
91
92
-
Alternatively, an error object can also be created with a formatted message in the style of fmtlib using `errors::format` function.
92
+
Alternatively, an error object can also be created with a formatted message in the style of fmtlib using :cpp:func:`errors::format` function.
0 commit comments