Changeset 5544:16ca0566b0e9 in roaraudio for include


Ignore:
Timestamp:
06/17/12 10:36:37 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Improved error handling (including on win32) (Closes: #235)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/error.h

    r5539 r5544  
    4040 
    4141struct roar_message; 
     42 
     43enum roar_error_type { 
     44 ROAR_ERROR_TYPE_ROARAUDIO = 0, 
     45 ROAR_ERROR_TYPE_ERRNO, 
     46 ROAR_ERROR_TYPE_WINSOCK, 
     47 ROAR_ERROR_TYPE_HERROR, 
     48 ROAR_ERROR_TYPE_YIFF, 
     49 ROAR_ERROR_TYPE_APPLICATION, 
     50 ROAR_ERROR_TYPE_HTTP 
     51}; 
    4252 
    4353/* 
     
    113123void   roar_err_to_errno(void); 
    114124 
     125// Convert error codes between diffrent representations. 
     126// returnes the error or ROAR_ERROR_NONE on success so it does not alter global error state. 
     127int    roar_err_convert(int * out, const enum roar_error_type outtype, const int in, const enum roar_error_type intype); 
     128 
     129// Outputs a default error for the given type. 
     130// returnes the error or ROAR_ERROR_NONE on success so it does not alter global error state. 
     131int    roar_err_get_default_error(int * out, const enum roar_error_type type); 
     132 
    115133// Resets the stored state to 'no error' state. This can be used 
    116134// to init the state. 
Note: See TracChangeset for help on using the changeset viewer.