Skip to content

Commit d327c08

Browse files
committed
Fix some typos
1 parent f4034fe commit d327c08

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

doc/leaf.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ leaf::result<U> r = leaf::try_handle_some(
401401
Once again, error handlers are considered in order:
402402

403403
* 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;
404-
* otherwise, the second error handler will be used if an error object of type `io_error` is avaliable;
404+
* otherwise, the second error handler will be used if an error object of type `io_error` is available;
405405
* otherwise, `leaf_try_handle_some` fails.
406406

407407
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
31613161
** its `std::exception` subobject is default-initialized;
31623162
** its `error_id` subobject is initialized by `<<new_error>>(std::forward<E1>(e1), std::forward<E>(e)...`).
31633163

3164-
<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:
3164+
<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:
31653165
** its `std::exception` subobject is default-initialized;
31663166
** its `error_id` subobject is initialized by `<<new_error>>()`.
31673167

@@ -4025,7 +4025,7 @@ namespace boost { namespace leaf {
40254025

40264026
These functions have the usual semantics, comparing `a.value()` and `b.value()`.
40274027

4028-
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`.
4028+
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`.
40294029

40304030
'''
40314031

@@ -4723,7 +4723,7 @@ Effects:
47234723
[[result::value_type]]
47244724
==== `value_type`
47254725

4726-
A member type of `result<T>`, defined as a synonim for `T`.
4726+
A member type of `result<T>`, defined as a synonym for `T`.
47274727

47284728
'''
47294729

doc/whitepaper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ The above function computes a `float` value based on the contents of the specifi
241241

242242
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*).
243243

244-
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).
244+
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).
245245

246246
### 6.2. C++ Exceptions
247247

@@ -357,7 +357,7 @@ Using LEAF, *error handling* functions match error objects similarly to the way
357357
* Each handler can specify multiple objects to be matched by type, rather than only one.
358358
* 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.
359359

360-
Whithout exception handling, this is achieved using the following syntax:
360+
Without exception handling, this is achieved using the following syntax:
361361

362362
```c++
363363
leaf::handle_all(

example/print_file/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Print File Example
22

3-
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.
3+
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.
44

55
* [print_file_leaf_result.cpp](./print_file_leaf_result.cpp) reports errors with
66
`leaf::result<T>`, using an error code `enum` for classification of failures.

example/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Example Programs Using LEAF to Handle Errors
22

3-
* [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.
3+
* [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.
44

55
* [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.
66
* [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.

include/boost/leaf/detail/demangle.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

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

0 commit comments

Comments
 (0)