NAME

set_error - Sets an error message

SYNOPSIS

#include "l/l_sys_err.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


void set_error
(
	const char *format_str,
	...
);

DESCRIPTION

This routine generally sets the kjb_error message, but the action can be modified using set_error_action. When it sets the error message, it overwrites the previous message. To build upon the previous messages, use either add_error(), insert_error(), or cat_error(). The argmuents to set_error is a format string followed by zero or more corresponding arguments. See kjb_fprintf for some of the non-standard options useful for error messages like %S, %F, %D. (%S is particularly helpful---it accesses the error messages from the last unsuccessful system call). kjb_print_error can be used to print the message when needed. It adds the return for every message string, so in general, message strings should not have returns in them.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

push_error_action , pop_error_action , set_error_action , get_error_action , set_bug_handler , default_bug_handler , kjb_print_error , kjb_get_error , kjb_get_strlen_error , kjb_clear_error , add_error , cat_error , insert_error , str_set_error , str_add_error , str_cat_error , str_insert_error , set_bug