/*! \file Macro.h
*	\brief User Scol machine Macro conversion API
* \remarks This file was named "macro.h" when it was in the external "scol SDK" system, moved to vm to keep up to date.
*/

#ifndef _SCOL_ERROR_CODES_H_
#define _SCOL_ERROR_CODES_H_

#include "scolPrerequisites.h"

#ifdef __cplusplus
extern "C" {
#endif

//$BLG - v5.22: Add (Documented messages)
// Error constants
#define MERREND         1                                   //!< Invalid error code
#define MERROK          0                                   //!< No error
#define MERRMEM        -1																		//!< Out of memory
#define MERRTYP        (merrlog(__LINE__,__FILE__,-2))			//!< Syntax error
#define MERRRET        -3																		//!< Return error (wrong bytecode)
#define MERRNUL        -4																		//!< Division by zero
#define MERRNF         -5																		//!< File or function not found
#define MERRLINK       -6																		//!< Link error
#define MERRFULL       -7																		//!< Server full ? (never used in code)
#define MERRUNKNOWN    -8																		//!< Unknown
#define MERRTOOLARGE   -9																		//!< Index too large
#define MERREP        -10																		//!< Empty prototype
#define MERRFILE      -11																		//!< Cannot write file
#define MERRCLOSE     -12																		//!< Closed machine
//$BLG - v5.22: Add
#define MERRCHNLDWN   -13																		// Channel down

int merrlog(int line, char *file, int ret);

#ifdef __cplusplus
}
#endif

#endif
