File: errors.md

package info (click to toggle)
gloo-cuda 0.0~git20231202.5354032-5
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 2,156 kB
  • sloc: cpp: 21,546; python: 8,179; makefile: 70; sh: 68
file content (21 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Error handling
Gloo defines two groups of exceptions for raising errors: recoverable errors and
assertions.

## Recoverable errors
Gloo throws exceptions for potentially recoverable errors. The most common
examples include IO errors, where a connected machine or network link is
in a bad state, but the local machine is operational. The caller, with
appropriate context, may be able to recover or reconfigure the machine pool.

For `::gloo::IoException` specifically, the caller should assume the
transport layer is in an unknown state and recreate the transport
[pairs](../gloo/transport/pair.h) or containing collective algorithm instance.

Exceptions are defined in [`error.h`](../gloo/common/error.h) and should
extend `::gloo::Exception`.

## Assertions
Gloo asserts unexpected errors and logical invariants instead of expecting
callers to handle them. `GLOO_ENFORCE` macros are defined in
[`logging.h`](../gloo/common/logging.h)