using namespace icinga;
+DebugInfo::DebugInfo(void)
+ : FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
+{ }
+
/**
* Outputs a DebugInfo struct to a stream.
*
*
* @ingroup config
*/
-struct DebugInfo
+struct I2_BASE_API DebugInfo
{
String Path;
int LastLine;
int LastColumn;
- DebugInfo(void)
- : FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
- { }
+ DebugInfo(void);
};
I2_BASE_API std::ostream& operator<<(std::ostream& out, const DebugInfo& val);
I2_BASE_API DebugInfo DebugInfoRange(const DebugInfo& start, const DebugInfo& end);
-I2_BASE_API void ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbose);
+I2_BASE_API void ShowCodeFragment(std::ostream& out, const DebugInfo& di, bool verbose = true);
}
BOOST_FOREACH(const ConfigCompilerMessage& message, ConfigCompilerContext::GetInstance()->GetMessages()) {
std::ostringstream locbuf;
- ShowCodeFragment(locbuf, message.Location, true);
+ ShowCodeFragment(locbuf, message.Location);
String location = locbuf.str();
String logmsg;