cgrapht 1.0.0
A modern C++20 header-only graph library
Loading...
Searching...
No Matches
Error Handling

Result and error types used across all graph operations. More...

Classes

class  cgrapht::Result< SUCCESS, ERROR >
 Result wrapper for success or error values. More...
 

Enumerations

enum class  cgrapht::ErrorType {
  cgrapht::ErrorType::INVALID_ARGUMENT , cgrapht::ErrorType::ABSENT_VERTEX , cgrapht::ErrorType::ABSENT_EDGE , cgrapht::ErrorType::EDGE_ALREADY_EXISTS ,
  cgrapht::ErrorType::VERTEX_NOT_FREE , cgrapht::ErrorType::UNKNOWN
}
 Error codes returned by graph operations. More...
 

Detailed Description

Result and error types used across all graph operations.

Enumeration Type Documentation

◆ ErrorType

enum class cgrapht::ErrorType
strong

Error codes returned by graph operations.

All fallible graph operations return Result<T, ErrorType>. Check the error code via result.get_error() when result.is_ok() returns false.

Enumerator
INVALID_ARGUMENT 

A supplied argument is invalid.

ABSENT_VERTEX 

The referenced vertex ID does not exist in the graph.

ABSENT_EDGE 

The referenced edge ID does not exist in the graph.

EDGE_ALREADY_EXISTS 

An edge between the two vertices already exists.

VERTEX_NOT_FREE 

The vertex cannot be removed because it still has incident edges.

UNKNOWN 

An unexpected internal error occurred.

Definition at line 147 of file models.hpp.