mirror of https://github.com/Icinga/icinga2.git
parent
e368c43081
commit
4ed798385d
|
@ -94,7 +94,7 @@ check_function_exists(pipe2 HAVE_PIPE2)
|
||||||
check_library_exists(crypto BIO_f_zlib "" HAVE_BIOZLIB)
|
check_library_exists(crypto BIO_f_zlib "" HAVE_BIOZLIB)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES README COPYING COPYING.Exceptions AUTHORS ChangeLog INSTALL NEWS
|
FILES README COPYING COPYING.Exceptions AUTHORS ChangeLog INSTALL NEWS
|
||||||
|
|
|
@ -311,17 +311,32 @@ bool Application::IsDebugging(void)
|
||||||
return m_Debugging;
|
return m_Debugging;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display version information.
|
||||||
|
*/
|
||||||
|
void Application::DisplayVersionMessage(void)
|
||||||
|
{
|
||||||
|
std::cerr << "***" << std::endl
|
||||||
|
<< "* Application version: " << GetVersion() << std::endl
|
||||||
|
<< "* Installation root: " << GetPrefixDir() << std::endl
|
||||||
|
<< "* Local state directory: " << GetLocalStateDir() << std::endl
|
||||||
|
<< "* Package data directory: " << GetPkgDataDir() << std::endl
|
||||||
|
<< "* State path: " << GetStatePath() << std::endl
|
||||||
|
<< "* PID path: " << GetPidPath() << std::endl
|
||||||
|
<< "* Application type: " << GetApplicationType() << std::endl
|
||||||
|
<< "***" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a message that tells users what to do when they encounter a bug.
|
* Displays a message that tells users what to do when they encounter a bug.
|
||||||
*/
|
*/
|
||||||
void Application::DisplayBugMessage(void)
|
void Application::DisplayBugMessage(void)
|
||||||
{
|
{
|
||||||
std::cerr << "***" << std::endl
|
std::cerr << "***" << std::endl
|
||||||
<< "*** This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2" << std::endl
|
<< "* This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2" << std::endl
|
||||||
<< "*** please submit a bug report at https://dev.icinga.org/ and include this stack trace as well as any other" << std::endl
|
<< "* please submit a bug report at https://dev.icinga.org/ and include this stack trace as well as any other" << std::endl
|
||||||
<< "*** information that might be useful in order to reproduce this problem." << std::endl
|
<< "* information that might be useful in order to reproduce this problem." << std::endl
|
||||||
<< "***" << std::endl
|
<< "***" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -360,7 +375,10 @@ void Application::SigAbrtHandler(int)
|
||||||
sigaction(SIGABRT, &sa, NULL);
|
sigaction(SIGABRT, &sa, NULL);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
std::cerr << "Caught SIGABRT." << std::endl;
|
std::cerr << "Caught SIGABRT." << std::endl
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
DisplayVersionMessage();
|
||||||
|
|
||||||
StackTrace trace;
|
StackTrace trace;
|
||||||
std::cerr << "Stacktrace:" << std::endl;
|
std::cerr << "Stacktrace:" << std::endl;
|
||||||
|
@ -399,6 +417,11 @@ void Application::ExceptionHandler(void)
|
||||||
sigaction(SIGABRT, &sa, NULL);
|
sigaction(SIGABRT, &sa, NULL);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
std::cerr << "Caught unhandled exception." << std::endl
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
DisplayVersionMessage();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
throw;
|
throw;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
|
@ -415,7 +438,10 @@ void Application::ExceptionHandler(void)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LONG CALLBACK Application::SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi)
|
LONG CALLBACK Application::SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi)
|
||||||
{
|
{
|
||||||
std::cerr << "Unhandled SEH exception." << std::endl;
|
DisplayVersionMessage();
|
||||||
|
|
||||||
|
std::cerr << "Caught unhandled SEH exception." << std::endl
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
StackTrace trace(exi);
|
StackTrace trace(exi);
|
||||||
std::cerr << "Stacktrace:" << std::endl;
|
std::cerr << "Stacktrace:" << std::endl;
|
||||||
|
|
|
@ -122,6 +122,7 @@ private:
|
||||||
static LONG WINAPI SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi);
|
static LONG WINAPI SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
static void DisplayVersionMessage(void);
|
||||||
static void DisplayBugMessage(void);
|
static void DisplayBugMessage(void);
|
||||||
|
|
||||||
static void SigAbrtHandler(int signum);
|
static void SigAbrtHandler(int signum);
|
||||||
|
|
Loading…
Reference in New Issue