das2C
das core C utilities (v3)
Functions
spice.h File Reference

More...

Go to the source code of this file.

Functions

void das_spice_err_setup ()
 Setup spice so that errors are not automatically output to the standard output channel. More...
 
int das_send_spice_err (int nDasVer, const char *sErrType)
 Reads a spice error and outputs it as a das exception, the program should only call this if failed_ returns non-zero, and it should exit after callling this function. More...
 
int das_print_spice_error (const char *sProgName)
 Print a spice error to standard output. More...
 

Detailed Description

Function Documentation

◆ das_spice_err_setup()

void das_spice_err_setup ( )

Setup spice so that errors are not automatically output to the standard output channel.

Das2 readers (and unix programs in general) are only supposed to output data to standard out, not error messages.

◆ das_send_spice_err()

int das_send_spice_err ( int  nDasVer,
const char *  sErrType 
)

Reads a spice error and outputs it as a das exception, the program should only call this if failed_ returns non-zero, and it should exit after callling this function.

Parameters
nDasVer- Set to 1 to get das1 compatable output, 2 to get das2 output
sErrType- Use one of the predefined strings from the core das2 library:
  • DAS2_EXCEPT_NO_DATA_IN_INTERVAL
  • DAS2_EXCEPT_ILLEGAL_ARGUMENT
  • DAS2_EXCEPT_SERVER_ERROR
Returns
The function always returns a non-zero value so that the das server knows the request did not complete.

◆ das_print_spice_error()

int das_print_spice_error ( const char *  sProgName)

Print a spice error to standard output.

Returns
89, you can set this to the calling shell if you like, or call reset_c() get process different spice input