ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
Error and Exit Codes

Error codes and status values for ascii-chat. More...

Files

file  error_codes.h
 Error and exit codes - unified status values (0-255)
 

Enumerations

enum  asciichat_error_t {
  ASCIICHAT_OK = 0 , ERROR_GENERAL = 1 , ERROR_USAGE = 2 , ERROR_MEMORY = 3 ,
  ERROR_CONFIG = 4 , ERROR_CRYPTO_INIT = 5 , ERROR_LOGGING_INIT = 6 , ERROR_PLATFORM_INIT = 7 ,
  ERROR_INIT = 8 , ERROR_WEBCAM = 20 , ERROR_WEBCAM_IN_USE = 21 , ERROR_WEBCAM_PERMISSION = 22 ,
  ERROR_AUDIO = 23 , ERROR_AUDIO_IN_USE = 24 , ERROR_TERMINAL = 25 , ERROR_NETWORK = 40 ,
  ERROR_NETWORK_BIND = 41 , ERROR_NETWORK_CONNECT = 42 , ERROR_NETWORK_TIMEOUT = 43 , ERROR_NETWORK_PROTOCOL = 44 ,
  ERROR_NETWORK_SIZE = 45 , ERROR_RATE_LIMITED = 46 , ERROR_SESSION_NOT_FOUND = 47 , ERROR_SESSION_FULL = 48 ,
  ERROR_INVALID_PASSWORD = 49 , ERROR_INVALID_SIGNATURE = 50 , ERROR_ACDS_STRING_TAKEN = 51 , ERROR_ACDS_STRING_INVALID = 52 ,
  ERROR_INTERNAL = 53 , ERROR_UNKNOWN_PACKET = 54 , ERROR_CRYPTO = 60 , ERROR_CRYPTO_KEY = 61 ,
  ERROR_CRYPTO_AUTH = 62 , ERROR_CRYPTO_HANDSHAKE = 63 , ERROR_CRYPTO_VERIFICATION = 64 , ERROR_THREAD = 80 ,
  ERROR_BUFFER = 81 , ERROR_BUFFER_FULL = 82 , ERROR_BUFFER_OVERFLOW = 83 , ERROR_DISPLAY = 84 ,
  ERROR_INVALID_STATE = 85 , ERROR_INVALID_PARAM = 86 , ERROR_INVALID_FRAME = 87 , ERROR_RESOURCE_EXHAUSTED = 88 ,
  ERROR_FORMAT = 89 , ERROR_STRING = 90 , ERROR_NOT_FOUND = 91 , ERROR_SIGNAL_INTERRUPT = 100 ,
  ERROR_SIGNAL_CRASH = 101 , ERROR_ASSERTION_FAILED = 102 , ERROR_COMPRESSION = 103 , ERROR_DECOMPRESSION = 104 ,
  ERROR_FILE_OPERATION = 105 , ERROR_FILE_NOT_FOUND = 106 , ERROR_PROCESS_FAILED = 110
}
 Error and exit codes - unified status values (0-255) More...
 

Detailed Description

Error codes and status values for ascii-chat.

Single enum for both function return values and process exit codes. Following Unix conventions: 0 = success, 1 = general error, 2 = usage error.

Error codes are organized into ranges:

Enumeration Type Documentation

◆ asciichat_error_t

#include <error_codes.h>

Error and exit codes - unified status values (0-255)

Single enum for both function return values and process exit codes. Following Unix conventions: 0 = success, 1 = general error, 2 = usage error.

Enumerator
ASCIICHAT_OK 

Success

ERROR_GENERAL 

Unspecified error

ERROR_USAGE 

Invalid command line arguments or options

ERROR_MEMORY 

Memory allocation failed (OOM)

ERROR_CONFIG 

Configuration file or settings error

ERROR_CRYPTO_INIT 

Cryptographic initialization failed

ERROR_LOGGING_INIT 

Logging system initialization failed

ERROR_PLATFORM_INIT 

Platform-specific initialization failed

ERROR_INIT 

General initialization failed

ERROR_WEBCAM 

Webcam initialization or capture failed

ERROR_WEBCAM_IN_USE 

Webcam is in use by another application

ERROR_WEBCAM_PERMISSION 

Webcam permission denied

ERROR_AUDIO 

Audio device initialization or I/O failed

ERROR_AUDIO_IN_USE 

Audio device is in use

ERROR_TERMINAL 

Terminal initialization or capability detection failed

ERROR_NETWORK 

General network error

ERROR_NETWORK_BIND 

Cannot bind to port (server)

ERROR_NETWORK_CONNECT 

Cannot connect to server (client)

ERROR_NETWORK_TIMEOUT 

Network operation timed out

ERROR_NETWORK_PROTOCOL 

Protocol violation or incompatible version

ERROR_NETWORK_SIZE 

Network packet size error

ERROR_RATE_LIMITED 

Rate limit exceeded

ERROR_SESSION_NOT_FOUND 

Session not found or expired

ERROR_SESSION_FULL 

Session has reached max participants

ERROR_INVALID_PASSWORD 

Incorrect password

ERROR_INVALID_SIGNATURE 

Invalid cryptographic signature

ERROR_ACDS_STRING_TAKEN 

Requested session string already in use (ACDS)

ERROR_ACDS_STRING_INVALID 

Invalid session string format (ACDS)

ERROR_INTERNAL 

Internal server error

ERROR_UNKNOWN_PACKET 

Unknown packet type received

ERROR_CRYPTO 

Cryptographic operation failed

ERROR_CRYPTO_KEY 

Key loading, parsing, or generation failed

ERROR_CRYPTO_AUTH 

Authentication failed

ERROR_CRYPTO_HANDSHAKE 

Cryptographic handshake failed

ERROR_CRYPTO_VERIFICATION 

Signature or key verification failed

ERROR_THREAD 

Thread creation or management failed

ERROR_BUFFER 

Buffer allocation or overflow

ERROR_BUFFER_FULL 

Buffer full

ERROR_BUFFER_OVERFLOW 

Buffer overflow

ERROR_DISPLAY 

Display rendering or output error

ERROR_INVALID_STATE 

Invalid program state

ERROR_INVALID_PARAM 

Invalid parameter

ERROR_INVALID_FRAME 

Invalid frame data

ERROR_RESOURCE_EXHAUSTED 

System resources exhausted

ERROR_FORMAT 

String formatting operation failed

ERROR_STRING 

String manipulation operation failed

ERROR_NOT_FOUND 

Resource not found in registry or lookup

ERROR_SIGNAL_INTERRUPT 

Interrupted by signal (SIGINT, SIGTERM)

ERROR_SIGNAL_CRASH 

Fatal signal (SIGSEGV, SIGABRT, etc.)

ERROR_ASSERTION_FAILED 

Assertion or invariant violation

ERROR_COMPRESSION 

Compression operation failed

ERROR_DECOMPRESSION 

Decompression operation failed

ERROR_FILE_OPERATION 

File or directory operation failed

ERROR_FILE_NOT_FOUND 

File or directory not found

ERROR_PROCESS_FAILED 

Process execution or termination failed

Definition at line 46 of file error_codes.h.

46 {
47 /* Standard codes (0-2) - Unix conventions */
48 ASCIICHAT_OK = 0,
49 ERROR_GENERAL = 1,
50 ERROR_USAGE = 2,
52 /* Initialization failures (3-19) */
53 ERROR_MEMORY = 3,
54 ERROR_CONFIG = 4,
58 ERROR_INIT = 8,
60 /* Hardware/Device errors (20-39) */
61 ERROR_WEBCAM = 20,
64 ERROR_AUDIO = 23,
66 ERROR_TERMINAL = 25,
68 /* Network errors (40-59) */
69 ERROR_NETWORK = 40,
76 /* Session and protocol errors (46-55) */
84 ERROR_INTERNAL = 53,
87 /* Security/Crypto errors (60-79) */
88 ERROR_CRYPTO = 60,
89 ERROR_CRYPTO_KEY = 61,
94 /* Runtime errors (80-99) */
95 ERROR_THREAD = 80,
96 ERROR_BUFFER = 81,
99 ERROR_DISPLAY = 84,
104 ERROR_FORMAT = 89,
105 ERROR_STRING = 90,
106 ERROR_NOT_FOUND = 91,
108 /* Signal/Crash handlers (100-127) */
110 ERROR_SIGNAL_CRASH = 101,
113 /* Compression errors (103-104) */
114 ERROR_COMPRESSION = 103,
115 ERROR_DECOMPRESSION = 104,
117 /* File system errors (105-109) */
121 /* Process errors (110-119) */
124 /* Reserved (128-255) - Should not be used */
125 /* 128+N typically means "terminated by signal N" on Unix systems */
126
asciichat_error_t
Error and exit codes - unified status values (0-255)
Definition error_codes.h:46
@ ERROR_LOGGING_INIT
Definition error_codes.h:56
@ ERROR_INVALID_STATE
@ ERROR_CRYPTO_HANDSHAKE
Definition error_codes.h:91
@ ERROR_NETWORK_CONNECT
Definition error_codes.h:71
@ ERROR_CRYPTO_KEY
Definition error_codes.h:89
@ ERROR_SIGNAL_INTERRUPT
@ ERROR_UNKNOWN_PACKET
Definition error_codes.h:85
@ ERROR_INVALID_PASSWORD
Definition error_codes.h:80
@ ERROR_COMPRESSION
@ ERROR_ACDS_STRING_INVALID
Definition error_codes.h:83
@ ERROR_ACDS_STRING_TAKEN
Definition error_codes.h:82
@ ERROR_NETWORK_BIND
Definition error_codes.h:70
@ ERROR_FILE_NOT_FOUND
@ ERROR_NETWORK
Definition error_codes.h:69
@ ERROR_PLATFORM_INIT
Definition error_codes.h:57
@ ERROR_WEBCAM_IN_USE
Definition error_codes.h:62
@ ERROR_CRYPTO_VERIFICATION
Definition error_codes.h:92
@ ERROR_RESOURCE_EXHAUSTED
@ ERROR_PROCESS_FAILED
@ ERROR_NOT_FOUND
@ ERROR_BUFFER_FULL
Definition error_codes.h:97
@ ERROR_AUDIO
Definition error_codes.h:64
@ ERROR_NETWORK_PROTOCOL
Definition error_codes.h:73
@ ERROR_DECOMPRESSION
@ ERROR_MEMORY
Definition error_codes.h:53
@ ASCIICHAT_OK
Definition error_codes.h:48
@ ERROR_GENERAL
Definition error_codes.h:49
@ ERROR_STRING
@ ERROR_INVALID_SIGNATURE
Definition error_codes.h:81
@ ERROR_NETWORK_SIZE
Definition error_codes.h:74
@ ERROR_CRYPTO_AUTH
Definition error_codes.h:90
@ ERROR_INIT
Definition error_codes.h:58
@ ERROR_WEBCAM_PERMISSION
Definition error_codes.h:63
@ ERROR_RATE_LIMITED
Definition error_codes.h:77
@ ERROR_SESSION_FULL
Definition error_codes.h:79
@ ERROR_DISPLAY
Definition error_codes.h:99
@ ERROR_CRYPTO_INIT
Definition error_codes.h:55
@ ERROR_INVALID_FRAME
@ ERROR_CONFIG
Definition error_codes.h:54
@ ERROR_FILE_OPERATION
@ ERROR_CRYPTO
Definition error_codes.h:88
@ ERROR_SIGNAL_CRASH
@ ERROR_USAGE
Definition error_codes.h:50
@ ERROR_INVALID_PARAM
@ ERROR_BUFFER_OVERFLOW
Definition error_codes.h:98
@ ERROR_INTERNAL
Definition error_codes.h:84
@ ERROR_AUDIO_IN_USE
Definition error_codes.h:65
@ ERROR_TERMINAL
Definition error_codes.h:66
@ ERROR_ASSERTION_FAILED
@ ERROR_SESSION_NOT_FOUND
Definition error_codes.h:78
@ ERROR_NETWORK_TIMEOUT
Definition error_codes.h:72
@ ERROR_WEBCAM
Definition error_codes.h:61
@ ERROR_BUFFER
Definition error_codes.h:96
@ ERROR_THREAD
Definition error_codes.h:95
@ ERROR_FORMAT