LibNRG  0.0.1
Networking for Real-time Games library
 All Classes Files Functions Variables Friends
nrg::Status Struct Reference

Class to wrap system and internal errors.

#include <nrg_status.h>

Inheritance diagram for nrg::Status:
nrg::StatusErr nrg::StatusOK

Public Types

enum  : int { Ok, InternalError, SystemError }
 Enumeration for error type.
 

Public Member Functions

 Status ()
 Default Constructor, creates a no-error status.
 
 Status (bool ok, int err=0)
 Constructor with the given error-status and errno for system-errors.
 
 Status (const char *custom)
 Constructor for custom errors, with the specified error string.
 
 operator bool () const
 bool conversion operator
 

Public Attributes

enum nrg::Status:: { ... }  type
 Enumeration for error type.
 
int sys_errno
 The associated errno for the error, or 0 if not a system error.
 
const char * desc
 Statically-allocated description of the error.
 

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