mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
82a9a8f0cf
commit
c3cf7682b9
@ -23,6 +23,10 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
|
DebugInfo::DebugInfo(void)
|
||||||
|
: FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
|
||||||
|
{ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs a DebugInfo struct to a stream.
|
* Outputs a DebugInfo struct to a stream.
|
||||||
*
|
*
|
||||||
|
@ -31,7 +31,7 @@ namespace icinga
|
|||||||
*
|
*
|
||||||
* @ingroup config
|
* @ingroup config
|
||||||
*/
|
*/
|
||||||
struct DebugInfo
|
struct I2_BASE_API DebugInfo
|
||||||
{
|
{
|
||||||
String Path;
|
String Path;
|
||||||
|
|
||||||
@ -41,16 +41,14 @@ struct DebugInfo
|
|||||||
int LastLine;
|
int LastLine;
|
||||||
int LastColumn;
|
int LastColumn;
|
||||||
|
|
||||||
DebugInfo(void)
|
DebugInfo(void);
|
||||||
: FirstLine(0), FirstColumn(0), LastLine(0), LastColumn(0)
|
|
||||||
{ }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
I2_BASE_API std::ostream& operator<<(std::ostream& out, const DebugInfo& val);
|
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 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ static bool LoadConfigFiles(const boost::program_options::variables_map& vm, con
|
|||||||
|
|
||||||
BOOST_FOREACH(const ConfigCompilerMessage& message, ConfigCompilerContext::GetInstance()->GetMessages()) {
|
BOOST_FOREACH(const ConfigCompilerMessage& message, ConfigCompilerContext::GetInstance()->GetMessages()) {
|
||||||
std::ostringstream locbuf;
|
std::ostringstream locbuf;
|
||||||
ShowCodeFragment(locbuf, message.Location, true);
|
ShowCodeFragment(locbuf, message.Location);
|
||||||
String location = locbuf.str();
|
String location = locbuf.str();
|
||||||
|
|
||||||
String logmsg;
|
String logmsg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user