
/** @file  psAbort.h
 *
 *  @brief Contains the declarations for the abort function
 *
 *  The abort logging and handling shall be performed by psAbort function.
 *  This will allow for consistent handling of other software units
 *  needing to abort from program execution.
 *
 *  @ingroup ErrorHandling
 *
 *  @author Eric Van Alst, MHPCC
 *
 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
 *  @date $Date: 2006-08-26 04:34:28 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
 */

#ifndef PS_ABORT_H
#define PS_ABORT_H

// Doxygen grouping tags

/** @addtogroup ErrorHandling
 *  @{
 */

/** Reports an abort message to logging facility
 *
 *  This function will invoke the psLogMsg function with a level of
 *  PS_LOG_ABORT and pass the parameters name and fmt to generate a proper
 *  log message.  After logging, this function will call system abort
 *  function to abnormally terminate the program.
 *
 *  @return  void No return value
 *
 */
#ifdef __GNUC__
void psAbort(
    const char *name,                  ///< Source of abort such as file or function detected
    const char *format,                   ///< A printf style formatting statement defining msg
    ...
) __attribute__((format(printf, 2, 3)));
#else // __GNUC__
void psAbort(
    const char *name,                  ///< Source of abort such as file or function detected
    const char *format,                   ///< A printf style formatting statement defining msg
    ...
);
#endif // __GNUC__

/** @} */ // Doxygen - End of SystemGroup Functions

#endif // #ifndef PS_ABORT_H
