2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-01-19 04:22:08 +00:00

Fix some typos

This commit is contained in:
Dirk Stolle
2025-06-01 03:22:57 +02:00
parent f4034fecde
commit d327c083ff
5 changed files with 9 additions and 9 deletions

View File

@@ -401,7 +401,7 @@ leaf::result<U> r = leaf::try_handle_some(
Once again, error handlers are considered in order:
* The first error handler will be used if an error object of type `io_error` _and_ and error_object of type `e_file_name` are available;
* otherwise, the second error handler will be used if an error object of type `io_error` is avaliable;
* otherwise, the second error handler will be used if an error object of type `io_error` is available;
* otherwise, `leaf_try_handle_some` fails.
An alternative way to write the above is to provide a single error handler that takes the `e_file_name` argument as a pointer:
@@ -3161,7 +3161,7 @@ The `throw_exception` function is overloaded: it can be invoked with no argument
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by `<<new_error>>(std::forward<E1>(e1), std::forward<E>(e)...`).
<3> If the fuction is invoked without arguments, the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
<3> If the function is invoked without arguments, the thrown exception is of unspecified type which derives publicly from `std::exception` *and* from class `error_id`, such that:
** its `std::exception` subobject is default-initialized;
** its `error_id` subobject is initialized by `<<new_error>>()`.
@@ -4025,7 +4025,7 @@ namespace boost { namespace leaf {
These functions have the usual semantics, comparing `a.value()` and `b.value()`.
NOTE: The exact strict weak ordering implemented by `operator<` is not specified. In particular, if for two `error_id` objects `a` and `b`, `a < b` is true, it does not follow that the failure identified by `a` ocurred earlier than the one identified by `b`.
NOTE: The exact strict weak ordering implemented by `operator<` is not specified. In particular, if for two `error_id` objects `a` and `b`, `a < b` is true, it does not follow that the failure identified by `a` occurred earlier than the one identified by `b`.
'''
@@ -4723,7 +4723,7 @@ Effects:
[[result::value_type]]
==== `value_type`
A member type of `result<T>`, defined as a synonim for `T`.
A member type of `result<T>`, defined as a synonym for `T`.
'''

View File

@@ -241,7 +241,7 @@ The above function computes a `float` value based on the contents of the specifi
In case of failure to `open()`, our function stays out of the way: the error code is communicated from `open()` (which sets the `errno`) *directly* to an *error handling* function up the call stack (which examines the `errno` in order to understand the failure), while the return value of each intermediate function needs only communicate a single bit of data (the *failure flag*).
The major drawback of this appoach is that the *failure flag* is not communicated uniformly, which means that *error neutral* functions can't check for errors generically (e.g. each layer needs to know about the different `INVALID_VALUE`s).
The major drawback of this approach is that the *failure flag* is not communicated uniformly, which means that *error neutral* functions can't check for errors generically (e.g. each layer needs to know about the different `INVALID_VALUE`s).
### 6.2. C++ Exceptions
@@ -357,7 +357,7 @@ Using LEAF, *error handling* functions match error objects similarly to the way
* Each handler can specify multiple objects to be matched by type, rather than only one.
* The error objects are matched dynamically, but solely based on their static type. This allows *all* error objects to be allocated on the stack, using automatic storage duration.
Whithout exception handling, this is achieved using the following syntax:
Without exception handling, this is achieved using the following syntax:
```c++
leaf::handle_all(

View File

@@ -1,6 +1,6 @@
# Print File Example
This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementaiton.
This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementation.
* [print_file_leaf_result.cpp](./print_file_leaf_result.cpp) reports errors with
`leaf::result<T>`, using an error code `enum` for classification of failures.

View File

@@ -1,6 +1,6 @@
# Example Programs Using LEAF to Handle Errors
* [print_file](./print_file): This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementaiton.
* [print_file](./print_file): This directory contains several versions of a trivial program which takes a file name on the command line and prints it. Each version uses a different error handling implementation.
* [try_capture_all_result.cpp](https://github.com/boostorg/leaf/blob/master/example/try_capture_all_result.cpp?ts=4): Shows how to transport error objects between threads in a `leaf::result<T>` object without using exception handling.
* [try_capture_all_exceptions.cpp](https://github.com/boostorg/leaf/blob/master/example/try_capture_all_exceptions.cpp?ts=4): Shows how to transport error objects between threads in a `leaf::result<T>` object using exception handling.

View File

@@ -33,7 +33,7 @@
#if defined(BOOST_LEAF_HAS_CXXABI_H)
# include <cxxabi.h>
// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library
// For some architectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library
// (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement
// abi::__cxa_demangle(). We detect this implementation by checking the include guard here.
# if defined(__GABIXX_CXXABI_H__)