--- projects/libstatgrab/docs/libstatgrab/statgrab.xml 2004/05/02 17:39:19 1.8 +++ projects/libstatgrab/docs/libstatgrab/statgrab.xml 2004/05/04 19:28:06 1.9 @@ -6,8 +6,8 @@ - $Date: 2004/05/02 17:39:19 $ - $Id: statgrab.xml,v 1.8 2004/05/02 17:39:19 tdb Exp $ + $Date: 2004/05/04 19:28:06 $ + $Id: statgrab.xml,v 1.9 2004/05/04 19:28:06 tdb Exp $ @@ -35,6 +35,19 @@ + sg_error sg_get_error + + + + const char *sg_get_error_arg + + + + const char *sg_str_error + sg_error code + + + sg_cpu_stats *sg_get_cpu_stats @@ -137,6 +150,19 @@ sg_init and sg_drop_privileges return 0 on success, and non-zero on failure. + + + There are three functions relating to error reporting in libstatgrab. + The first, sg_get_error returns an sg_error code + which relates to the last error generated by libstatgrab. This can be + converted to a string by calling sg_str_error + giving the sg_error code as an argument. Finally, an optional + argument may be set when the error was generated. This can be + accessed by calling sg_get_error_arg. + + + It is the intended practice that whenever a libstatgrab function is + called and subsequently fails that an appropriate error will be set. The library was originally written to support the i-scream