Sponge
CS144's user-space TCP library
Public Member Functions | List of all members
unix_error Class Reference

a tagged_error for syscalls More...

#include <util.hh>

Inheritance diagram for unix_error:
Inheritance graph
[legend]

Public Member Functions

 unix_error (const std::string &attempt, const int error=errno)
 
- Public Member Functions inherited from tagged_error
 tagged_error (const std::error_category &category, const std::string &attempt, const int error_code)
 Construct from a category, an attempt, and an error code. More...
 
const char * what () const noexcept override
 Returns a C string describing the error. More...
 
- Public Member Functions inherited from std::system_error
system_error (T... args)
 
code (T... args)
 
what (T... args)
 

Detailed Description

a tagged_error for syscalls

Definition at line 33 of file util.hh.

Constructor & Destructor Documentation

◆ unix_error()

unix_error::unix_error ( const std::string attempt,
const int  error = errno 
)
inlineexplicit

brief Construct from a syscall name and the resulting errno

Parameters
[in]attemptis the name of the syscall attempted
[in]erroris the errno(3) that resulted

Definition at line 38 of file util.hh.


The documentation for this class was generated from the following file: