Changeset 4b1e6fe in nscp
- Timestamp:
- 08/30/11 23:08:13 (21 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 1307e3f5
- Parents:
- 60e6c18
- Files:
-
- 21 added
- 21 edited
-
build/cmake/NSCPPBuffer.cmake (modified) (1 diff)
-
changelog (modified) (1 diff)
-
include/NSCAPI.h (modified) (1 diff)
-
include/nscapi/functions.hpp (modified) (1 diff)
-
include/nscapi/macros.hpp (modified) (2 diffs)
-
include/settings/client/settings_client.hpp (modified) (2 diffs)
-
modules/CheckDisk/CheckDisk.cpp (modified) (1 diff)
-
modules/CheckEventLog/CheckEventLog.cpp (modified) (1 diff)
-
modules/CheckHelpers/CheckHelpers.cpp (modified) (1 diff)
-
modules/CheckNSCP/CheckNSCP.cpp (modified) (1 diff)
-
modules/CheckSystem/CheckSystem.cpp (modified) (1 diff)
-
modules/CheckTaskSched/CheckTaskSched.cpp (modified) (1 diff)
-
modules/CheckTaskSched2/CheckTaskSched2.cpp (modified) (1 diff)
-
modules/CheckWMI/CheckWMI.cpp (modified) (2 diffs)
-
modules/FileLogger/FileLogger.cpp (modified) (1 diff)
-
modules/NSCAAgent/NSCAAgent.cpp (modified) (1 diff)
-
modules/PythonScript/PythonScript.cpp (modified) (1 diff)
-
modules/Scheduler/Scheduler.cpp (modified) (3 diffs)
-
scripts/CMakeLists.txt (modified) (2 diffs)
-
scripts/python/lib/__init__.py (added)
-
scripts/python/lib/google/__init__.py (added)
-
scripts/python/lib/google/protobuf/__init__.py (added)
-
scripts/python/lib/google/protobuf/compiler/plugin_pb2.py (added)
-
scripts/python/lib/google/protobuf/descriptor.py (added)
-
scripts/python/lib/google/protobuf/descriptor_pb2.py (added)
-
scripts/python/lib/google/protobuf/internal/__init__.py (added)
-
scripts/python/lib/google/protobuf/internal/api_implementation.py (added)
-
scripts/python/lib/google/protobuf/internal/containers.py (added)
-
scripts/python/lib/google/protobuf/internal/cpp_message.py (added)
-
scripts/python/lib/google/protobuf/internal/decoder.py (added)
-
scripts/python/lib/google/protobuf/internal/encoder.py (added)
-
scripts/python/lib/google/protobuf/internal/message_listener.py (added)
-
scripts/python/lib/google/protobuf/internal/python_message.py (added)
-
scripts/python/lib/google/protobuf/internal/type_checkers.py (added)
-
scripts/python/lib/google/protobuf/internal/wire_format.py (added)
-
scripts/python/lib/google/protobuf/message.py (added)
-
scripts/python/lib/google/protobuf/reflection.py (added)
-
scripts/python/lib/google/protobuf/service.py (added)
-
scripts/python/lib/google/protobuf/service_reflection.py (added)
-
scripts/python/lib/google/protobuf/text_format.py (added)
-
scripts/python/test.py (modified) (7 diffs)
-
service/simple_client.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
build/cmake/NSCPPBuffer.cmake
rafd42f1 r4b1e6fe 91 91 SET(PB_TARGET_INCLUDE ${INCL}) 92 92 #configure_file(${ABS_FIL}.h.in ${ABS_FIL}.h) 93 file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/scripts/python/lib) 93 94 94 95 ADD_CUSTOM_COMMAND( 95 OUTPUT ${${VAR}} ${INCL} 96 OUTPUT ${${VAR}} ${INCL} ${PROJECT_BINARY_DIR}/scripts/python/lib/${FIL_WE}_pb2.py 96 97 COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} 97 ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --p roto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL}98 ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --python_out ${PROJECT_BINARY_DIR}/scripts/python/lib --proto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL} 98 99 DEPENDS ${ABS_FIL} 99 100 COMMENT "Running protocol buffer compiler on ${FIL} - ${PROTOBUF_PROTOC_EXECUTABLE}" VERBATIM ) -
changelog
r60e6c18 r4b1e6fe 5 5 * Fixa dependonservice LanManWorkStation (old win) 6 6 * Fix RtlStringFromGUID problem on NT4 7 8 2011-08-30 MickeM 9 * Fixed uncaught exception in test client 10 * Added protocol buffers to source (needs to be added to installer as well) 11 * Added example python protocol buffer handler 12 * Added lib folder to python scripting (and automagicall load) 7 13 8 14 2011-08-29 MickeM -
include/NSCAPI.h
rb9498ef r4b1e6fe 114 114 class nscapi_exception : public std::exception { 115 115 public: 116 std:: wstring msg_;117 nscapi_exception(std::wstring msg) : msg_( msg) {}116 std::string msg_; 117 nscapi_exception(std::wstring msg) : msg_(utf8::cvt<std::string>(msg)) {} 118 118 119 119 120 virtual ~nscapi_exception() throw() {} 121 std::string what() { 122 return utf8::cvt<std::string>(msg_); 120 ~nscapi_exception() throw() {} 121 const char* what() const throw() { 122 return msg_.c_str(); 123 } 124 const std::wstring wwhat() const throw() { 125 return utf8::cvt<std::wstring>(msg_); 123 126 } 124 127 }; -
include/nscapi/functions.hpp
rd7e265d r4b1e6fe 180 180 181 181 182 if (message.payload_size() != 1) { 182 if (message.payload_size() == 0) { 183 return; 184 } else if (message.payload_size() > 1) { 183 185 throw nscapi_exception(_T("Whoops, invalid payload size (for now)")); 184 186 } -
include/nscapi/macros.hpp
r8840f09 r4b1e6fe 82 82 try { \ 83 83 return GET_PLUGIN()->wrapLoadModule(toObject.loadModuleEx(alias, mode)); \ 84 } catch (nscapi::nscapi_exception e) { \85 NSC_LOG_CRITICAL(_T("NSCMHE in: wrapLoadModule: " + e.msg_)); \86 return NSCAPI::hasFailed; \87 84 } catch (...) { \ 88 85 NSC_LOG_CRITICAL(_T("Unknown exception in: wrapLoadModule(...)")); \ … … 93 90 try { \ 94 91 return GET_PLUGIN()->wrapLoadModule(toObject.loadModule()); \ 95 } catch (nscapi::nscapi_exception e) { \96 NSC_LOG_CRITICAL(_T("NSCMHE in: wrapLoadModule: " + e.msg_)); \97 return NSCAPI::hasFailed; \98 92 } catch (...) { \ 99 93 NSC_LOG_CRITICAL(_T("Unknown exception in: wrapLoadModule(...)")); \ -
include/settings/client/settings_client.hpp
rfe75eff r4b1e6fe 593 593 v->key->notify(core_, v->path, v->key_name); 594 594 } 595 } catch (const nscapi::nscapi_exception &e) {596 core_->err(__FILE__, __LINE__, _T("Failed to notify ") + v->key_name + _T(": ") + e.msg_);597 595 } catch (const std::exception &e) { 598 596 core_->err(__FILE__, __LINE__, _T("Failed to notify ") + v->key_name + _T(": ") + utf8::cvt<std::wstring>(e.what())); … … 605 603 if (v->path) 606 604 v->path->notify(core_, v->path_name); 607 } catch (const nscapi::nscapi_exception &e) {608 core_->err(__FILE__, __LINE__, _T("Failed to notify ") + v->path_name + _T(": ") + e.msg_);609 605 } catch (const std::exception &e) { 610 606 core_->err(__FILE__, __LINE__, _T("Failed to notify ") + v->path_name + _T(": ") + utf8::cvt<std::wstring>(e.what())); -
modules/CheckDisk/CheckDisk.cpp
rfe75eff r4b1e6fe 72 72 _T("SHOW ERRORS"), _T("")) 73 73 ; 74 } catch (nscapi::nscapi_exception &e) { 75 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 76 return false; 74 77 } catch (std::exception &e) { 75 NSC_LOG_ERROR_STD(_T("Exception caught: ") + utf8::cvt<std::wstring>(e.what())); 76 return false; 77 } catch (nscapi::nscapi_exception &e) { 78 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 78 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 79 79 return false; 80 80 } catch (...) { -
modules/CheckEventLog/CheckEventLog.cpp
rfe75eff r4b1e6fe 98 98 settings.notify(); 99 99 100 } catch (nscapi::nscapi_exception &e) { 101 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 102 return false; 100 103 } catch (std::exception &e) { 101 NSC_LOG_ERROR_STD(_T("Exception caught: ") + utf8::cvt<std::wstring>(e.what())); 102 return false; 103 } catch (nscapi::nscapi_exception &e) { 104 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 104 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 105 105 return false; 106 106 } catch (...) { -
modules/CheckHelpers/CheckHelpers.cpp
rfe75eff r4b1e6fe 56 56 get_core()->registerCommand(_T("CheckVersion"), _T("Just return the nagios version (along with OK status).")); 57 57 } catch (nscapi::nscapi_exception &e) { 58 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 58 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 59 return false; 60 } catch (std::exception &e) { 61 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 62 return false; 59 63 } catch (...) { 60 64 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 65 return false; 61 66 } 62 67 return true; -
modules/CheckNSCP/CheckNSCP.cpp
rfe75eff r4b1e6fe 54 54 get_core()->registerCommand(_T("check_nscp"), _T("Check the internal healt of NSClient++.")); 55 55 } catch (nscapi::nscapi_exception &e) { 56 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 56 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 57 return false; 58 } catch (std::exception &e) { 59 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 60 return false; 57 61 } catch (...) { 58 62 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 63 return false; 59 64 } 60 65 return true; -
modules/CheckSystem/CheckSystem.cpp
rfe75eff r4b1e6fe 147 147 get_core()->registerCommand(_T("checkSingleRegEntry"), _T("Check registry key")); 148 148 } catch (nscapi::nscapi_exception &e) { 149 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 149 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 150 return false; 151 } catch (std::exception &e) { 152 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 153 return false; 150 154 } catch (...) { 151 155 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 156 return false; 152 157 } 153 158 -
modules/CheckTaskSched/CheckTaskSched.cpp
rfe75eff r4b1e6fe 52 52 SETTINGS_REG_KEY_S(task_scheduler::SYNTAX); 53 53 } catch (nscapi::nscapi_exception &e) { 54 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 54 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 55 return false; 56 } catch (std::exception &e) { 57 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 58 return false; 55 59 } catch (...) { 56 60 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 61 return false; 57 62 } 58 63 syntax = SETTINGS_GET_STRING(task_scheduler::SYNTAX); -
modules/CheckTaskSched2/CheckTaskSched2.cpp
rfe75eff r4b1e6fe 51 51 SETTINGS_REG_KEY_S(task_scheduler::SYNTAX); 52 52 } catch (nscapi::nscapi_exception &e) { 53 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 53 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 54 return false; 55 } catch (std::exception &e) { 56 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 57 return false; 54 58 } catch (...) { 55 59 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 60 return false; 56 61 } 57 62 syntax = SETTINGS_GET_STRING(task_scheduler::SYNTAX); -
modules/CheckWMI/CheckWMI.cpp
rfe75eff r4b1e6fe 76 76 77 77 } catch (nscapi::nscapi_exception &e) { 78 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 78 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 79 } catch (std::exception &e) { 80 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 79 81 } catch (...) { 80 82 NSC_LOG_ERROR_STD(_T("Failed to register command.")); … … 104 106 105 107 } catch (nscapi::nscapi_exception &e) { 106 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 108 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 109 return false; 110 } catch (std::exception &e) { 111 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 112 return false; 107 113 } catch (...) { 108 114 NSC_LOG_ERROR_STD(_T("Failed to register command.")); 115 return false; 109 116 } 110 117 return true; -
modules/FileLogger/FileLogger.cpp
r7ec3dd1 r4b1e6fe 155 155 getFileName(); 156 156 157 } catch (nscapi::nscapi_exception &e) { 158 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 159 return false; 157 160 } catch (std::exception &e) { 158 161 NSC_LOG_ERROR_STD(_T("Exception caught: ") + utf8::cvt<std::wstring>(e.what())); 159 return false;160 } catch (nscapi::nscapi_exception &e) {161 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_);162 162 return false; 163 163 } catch (...) { -
modules/NSCAAgent/NSCAAgent.cpp
rb9498ef r4b1e6fe 108 108 109 109 } catch (nscapi::nscapi_exception &e) { 110 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_);110 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 111 111 return false; 112 112 } catch (std::exception &e) { -
modules/PythonScript/PythonScript.cpp
rd7e265d r4b1e6fe 136 136 PyRun_SimpleString("import sys"); 137 137 PyRun_SimpleString("sys.stderr = cStringIO.StringIO()"); 138 138 boost::filesystem::wpath path = GET_CORE()->getBasePath(); 139 path /= _T("scripts"); 140 path /= _T("python"); 141 path /= _T("lib"); 142 PyRun_SimpleString(("sys.path.append('" + utf8::cvt<std::string>(path.string()) + "')").c_str()); 139 143 object ignored = exec_file(scriptfile.c_str(), localDict, localDict); 140 144 } catch( error_already_set e) { -
modules/Scheduler/Scheduler.cpp
r60e6c18 r4b1e6fe 68 68 69 69 } catch (nscapi::nscapi_exception &e) { 70 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_);70 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 71 71 return false; 72 72 } catch (std::exception &e) { 73 NSC_LOG_ERROR_STD(_T("Exception caught: ") + utf8::cvt<std::wstring>(e.what()));73 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 74 74 return false; 75 75 } catch (...) { … … 84 84 } 85 85 } catch (nscapi::nscapi_exception &e) { 86 NSC_LOG_ERROR_STD(_T("Exception in module Scheduler: ") + e.msg_); 86 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 87 return false; 88 } catch (std::exception &e) { 89 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 87 90 return false; 88 91 } catch (...) { … … 161 164 } 162 165 } catch (nscapi::nscapi_exception &e) { 163 NSC_LOG_ERROR_STD(_T("Exception handling: ") + item.alias + _T(": ") + e.msg_); 166 NSC_LOG_ERROR_STD(_T("Failed to register command: ") + utf8::cvt<std::wstring>(e.what())); 167 scheduler_.remove_task(item.id); 168 } catch (std::exception &e) { 169 NSC_LOG_ERROR_STD(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 164 170 scheduler_.remove_task(item.id); 165 171 } catch (...) { -
scripts/CMakeLists.txt
r04ef932 r4b1e6fe 5 5 FILE (GLOB scripts_PS1 "*.ps1") 6 6 FILE (GLOB scripts_LIB "lib/*.vbs") 7 FILE (GLOB scripts_PYT "python/*.py") 7 IF(WIN32) 8 FILE (GLOB_RECURSE scripts_PYT "python/*.py") 9 ELSE(WIN32) 10 FILE (GLOB scripts_PYT "python/*.py" "python/lib/*.py") 11 ENDIF(WIN32) 8 12 FILE (GLOB scripts_LUA "lua/*.lua") 9 13 … … 25 29 FOREACH(file ${scripts_PYT}) 26 30 get_filename_component(filename ${file} NAME) 27 #MESSAGE(STATUS " + lib - ${filename}") 28 copy_single_file("script python" python/${filename} scripts/python) 31 get_filename_component(filepath ${file} PATH) 32 file(RELATIVE_PATH relpath ${CMAKE_CURRENT_SOURCE_DIR} "${filepath}") 33 STRING(REPLACE "/" "_" alias "${relpath}") 34 STRING(REPLACE "." "_" alias "${alias}") 35 #MESSAGE(STATUS " + python - ${filename} - ${relpath} - ${alias}") 36 copy_single_file("python_${alias}" ${relpath}/${filename} scripts/${relpath}) 29 37 ENDFOREACH(file ${scripts_PYT}) 30 38 -
scripts/python/test.py
r2c95d22 r4b1e6fe 1 1 from NSCP import Settings, Registry, Core, log, status, get_alias 2 #import sys 3 #sys.path.append('D:/source/nscp/build/x64/scripts/python/include') 4 5 import plugin_pb2 2 6 3 7 core = Core.get() 8 9 prefix = 'py_' 4 10 5 11 def get_help(arguments): … … 16 22 log('Data: %d %s %s'%(code, message, perf)) 17 23 18 prefix = 'py_'19 24 def test(arguments): 20 25 global prefix … … 31 36 if perf != "'args'=2": 32 37 return (status.CRITICAL, "Test failed: -%s-"%perf) 33 return (status.OK, 'Tests ok') 38 39 message = plugin_pb2.QueryRequestMessage() 40 41 message.header.type = plugin_pb2.Common.Header.QUERY_REQUEST 42 message.header.version = plugin_pb2.Common.VERSION_1 43 44 payload = message.payload.add() 45 payload.command = "%snormal"%prefix 46 payload.arguments.append("hello") 47 48 (retcode, buffer) = core.query("%snormal"%prefix, message.SerializeToString()) 49 message = plugin_pb2.QueryResponseMessage() 50 message.ParseFromString(buffer) 51 if message.payload[0].perf[0].alias != "args": 52 return (status.CRITICAL, "Test failed: -%s-"%message.payload[0].perf[0].alias) 53 if message.payload[0].perf[0].float_value.value != 1: 54 return (status.CRITICAL, "Test failed: -%s-"%message.payload[0].perf[0].float_value.value) 55 56 return (status.OK, 'All tests ok') 34 57 35 58 def normal(arguments): … … 58 81 log('Got argument: %s'%a) 59 82 83 def simple_pb(command, buffer): 84 message = plugin_pb2.QueryRequestMessage() 85 message.ParseFromString(buffer) 86 for p in message.payload: 87 log('Command: %s'%p.command) 88 for a in p.arguments: 89 log('Arg: %s'%a) 90 91 response = plugin_pb2.QueryResponseMessage() 92 response.header.type = plugin_pb2.Common.Header.QUERY_RESPONSE 93 response.header.version = plugin_pb2.Common.VERSION_1 94 95 payload = response.payload.add() 96 payload.command = command 97 payload.result = plugin_pb2.Common.OK 98 payload.message = 'This is more difficult...' 99 100 return (status.OK, response.SerializeToString()) 101 60 102 def init(alias): 61 103 global prefix … … 77 119 reg.simple_function('%snom'%prefix, no_msg, 'No performance data') 78 120 reg.simple_function('%snor'%prefix, no_ret, 'No performance data') 121 122 reg.function('%spb'%prefix, simple_pb, 'Simple protocolbuffer sample') 123 79 124 80 125 reg.simple_cmdline('help', get_help) … … 83 128 reg.simple_subscription('%stest'%prefix, test_channel) 84 129 85 (ret, list) =core.simple_submit('%stest'%prefix, 'test.py', status.WARNING, 'hello', '')130 core.simple_submit('%stest'%prefix, 'test.py', status.WARNING, 'hello', '') 86 131 87 132 (ret, list) = core.simple_exec('%stest'%prefix, ['a', 'b', 'c']) … … 98 143 99 144 log('Saving configuration...') 100 conf.save()145 #conf.save() 101 146 102 147 def shutdown(): -
service/simple_client.hpp
r04ef932 r4b1e6fe 64 64 throw "test"; 65 65 } else { 66 strEx::token t = strEx::getToken(s, ' '); 67 std::wstring msg, perf; 68 NSCAPI::nagiosReturn ret = core_->inject(t.first, t.second, msg, perf); 69 if (ret == NSCAPI::returnIgnored) { 70 log(_T("No handler for command: ") + t.first); 71 } else { 72 log(nscapi::plugin_helper::translateReturn(ret) + _T(":") + msg); 73 if (!perf.empty()) 74 log(_T(" Perfoamcen data: ") + perf); 66 try { 67 strEx::token t = strEx::getToken(s, ' '); 68 std::wstring msg, perf; 69 NSCAPI::nagiosReturn ret = core_->inject(t.first, t.second, msg, perf); 70 if (ret == NSCAPI::returnIgnored) { 71 log(_T("No handler for command: ") + t.first); 72 } else { 73 log(nscapi::plugin_helper::translateReturn(ret) + _T(":") + msg); 74 if (!perf.empty()) 75 log(_T(" Performance data: ") + perf); 76 } 77 } catch (const nscapi::nscapi_exception &e) { 78 log(_T("NSCAPI Exception: ") + utf8::cvt<std::wstring>(e.what())); 79 } catch (const std::exception &e) { 80 log(_T("Exception: ") + utf8::cvt<std::wstring>(e.what())); 81 } catch (...) { 82 log(_T("Unknown exception")); 75 83 } 76 84 }
Note: See TracChangeset
for help on using the changeset viewer.








