Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

erl_error(3erl) [linux man page]

erl_error(3erl) 						C Library Functions						   erl_error(3erl)

NAME
erl_error - Error Print Routines DESCRIPTION
This module contains some error printing routines taken from Advanced Programming in the UNIX Environment by W. Richard Stevens. These functions are all called in the same manner as printf() , i.e. with a string containing format specifiers followed by a list of cor- responding arguments. All output from these functions is to stderr . EXPORTS
void erl_err_msg(FormatStr, ... ) Types const char *FormatStr; The message provided by the caller is printed. This function is simply a wrapper for fprintf() . void erl_err_quit(FormatStr, ... ) Types const char *FormatStr; Use this function when a fatal error has occurred that is not due to a system call. The message provided by the caller is printed and the process terminates with an exit value of 1. The function does not return. void erl_err_ret(FormatStr, ... ) Types const char *FormatStr; Use this function after a failed system call. The message provided by the caller is printed followed by a string describing the rea- son for failure. void erl_err_sys(FormatStr, ... ) Types const char *FormatStr; Use this function after a failed system call. The message provided by the caller is printed followed by a string describing the rea- son for failure, and the process terminates with an exit value of 1. The function does not return. ERROR REPORTING
Most functions in erl_interface report failures to the caller by returning some otherwise meaningless value (typically NULL or a negative number). As this only tells you that things did not go well, you will have to examine the error code in erl_errno if you want to find out more about the failure. EXPORTS
volatile int erl_errno erl_errno is initially (at program startup) zero and is then set by many erl_interface functions on failure to a non-zero error code to indicate what kind of error it encountered. A successful function call might change erl_errno (by calling some other function that fails), but no function will ever set it to zero. This means that you cannot use erl_errno to see if a function call failed. Instead, each function reports failure in its own way (usually by returning a negative number or NULL ), in which case you can exam- ine erl_errno for details. erl_errno uses the error codes defined in your system's <errno.h> . Note: Actually, erl_errno is a "modifiable lvalue" (just like ISO C defines errno to be) rather than a variable. This means it might be imple- mented as a macro (expanding to, e.g., *_erl_errno() ). For reasons of thread- (or task-)safety, this is exactly what we do on most plat- forms. Ericsson AB erl_interface 3.7.3 erl_error(3erl)

Check Out this Related Man Page

mnesia_registry(3erl)					     Erlang Module Definition					     mnesia_registry(3erl)

NAME
mnesia_registry - Dump support for registries in erl_interface. DESCRIPTION
The module mnesia_registry is usually part of erl_interface , but for the time being, it is a part of the Mnesia application. mnesia_registry is mainly an module intended for internal usage within OTP, but it has two functions that are exported for public use. On C-nodes erl_interface has support for registry tables. These reside in RAM on the C-node but they may also be dumped into Mnesia tables. By default, the dumping of registry tables via erl_interface causes a corresponding Mnesia table to be created with mnesia_registry:cre- ate_table/1 if necessary. The tables that are created with these functions can be administered as all other Mnesia tables. They may be included in backups or repli- cas may be added etc. The tables are in fact normal Mnesia tables owned by the user of the corresponding erl_interface registries. EXPORTS
create_table(Tab) -> ok | exit(Reason) This is a wrapper function for mnesia:create_table/2 which creates a table (if there is no existing table) with an appropriate set of attributes . The table will only reside on the local node and its storage type will be the same as the schema table on the local node, ie. {ram_copies,[node()]} or {disc_copies,[node()]} . It is this function that is used by erl_interface to create the Mnesia table if it did not already exist. create_table(Tab, TabDef) -> ok | exit(Reason) This is a wrapper function for mnesia:create_table/2 which creates a table (if there is no existing table) with an appropriate set of attributes . The attributes and TabDef are forwarded to mnesia:create_table/2 . For example, if the table should reside as disc_only_copies on all nodes a call would look like: TabDef = [{{disc_only_copies, node()|nodes()]}], mnesia_registry:create_table(my_reg, TabDef) SEE ALSO
mnesia(3erl), erl_interface(3erl) Ericsson AB mnesia 4.4.17 mnesia_registry(3erl)
Man Page