I'm trying to define a macro to be able to pass to throw a character
constant and some other values
Here's what I'm defining
#ifndef CR
#define CR << "\n"
#endif
#ifndef FL
#define FL << " (" << __FILE__ << ':' << __LINE__ << ")"
#endif
#ifndef SP
#define SP << ' '
#endif
#ifndef MSG
#define MSG(m) string str(m)
#endif
Here's where I'm trying to use it:
if (file.empty()) throw(MSG("Empty string recieved!") FL CR);
I'm using MSVisual Express 2008
I need for the first element of of the macro to be a constant char as
input to a string
Then have the << from FL and CR to add teh file name and line number
to the string then this will be caught by my catch section.