41 #ifndef __ADMB_MESSAGES_H__
42 #define __ADMB_MESSAGES_H__
46 #define ADMB_ERROR(x) admb::messages::error(x);
47 #define ADMB_ARRAY_BOUNDS_ERROR(message,function,lower_bounds,upper_bounds,\
48 index) admb::messages::array_bounds_error(message,function,lower_bounds,\
87 void error(
const int error_code)
93 message +=
"allocating memory in dmatrix contructor";
97 "attempting to access non-allocated ivector in ivector::operator()";
102 error(message, error_code);
109 const int error_code)
112 if (function_name.
size() > 0)
114 m +=
" in " + function_name;
116 error(m, error_code);
124 const int lower_bounds,
125 const int upper_bounds,
147 +
" used for array range ["
151 +
"] in \"" +
function +
"\".\n"
161 cerr << message <<
'\n';
static void error(const int error_code)
static void error(const adstring &message, const int error_code)
static void array_bounds_error(const adstring &message, const adstring &function, const int lower_bounds, const int upper_bounds, const int index)
static void error(const adstring &message)
const int ARRAY_BOUNDS_ERROR
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
adstring str(double x, int minwidth=17, int decplaces=-1)
Convert x to adstring with minimum width and total number of decimal places.
static void error(const adstring &message, const adstring &function_name, const int error_code)