mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 12:12:15 +02:00
Log lines from C++ exceptions should contain the text "exception"
This makes it easier to scan log files for exceptions. Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
parent
f05802cf95
commit
37d848ca20
@ -154,7 +154,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacLifeCycle Exception: " << e.what());
|
||||
OPENVPN_LOG("MacLifeCycle exception: " << e.what());
|
||||
}
|
||||
|
||||
// cleanup
|
||||
@ -306,7 +306,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacLifeCycle::action_timer_callback: " << e.what());
|
||||
OPENVPN_LOG("MacLifeCycle::action_timer_callback exception: " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,7 +702,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("Error parsing client-ip: " << e.what());
|
||||
OPENVPN_LOG("exception parsing client-ip: " << e.what());
|
||||
}
|
||||
ev->tun_name = tun->tun_name();
|
||||
connected_ = std::move(ev);
|
||||
@ -873,7 +873,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("Error parsing inactive: " << e.what());
|
||||
OPENVPN_LOG("exception parsing inactive: " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("ActionThread Exception: " << e.what());
|
||||
OPENVPN_LOG("ActionThread exception: " << e.what());
|
||||
}
|
||||
openvpn_io::post(io_context, [self=Ptr(this), status]()
|
||||
{
|
||||
|
@ -1344,7 +1344,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MbedTLSContext::epki_sign: " << e.what());
|
||||
OPENVPN_LOG("MbedTLSContext::epki_sign exception: " << e.what());
|
||||
return MBEDTLS_ERR_RSA_BAD_INPUT_DATA;
|
||||
}
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("OpenSSLContext::ExternalPKIImpl::rsa_priv_enc: " << e.what());
|
||||
OPENVPN_LOG("OpenSSLContext::ExternalPKIImpl::rsa_priv_enc exception: " << e.what());
|
||||
++self->n_errors;
|
||||
return -1;
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG_TCPLINK_ERROR("TCP packet extract error: " << e.what());
|
||||
OPENVPN_LOG_TCPLINK_ERROR("TCP packet extract exception: " << e.what());
|
||||
stats->error(Error::TCP_SIZE_ERROR);
|
||||
read_handler->tcp_error_handler("TCP_SIZE_ERROR");
|
||||
stop();
|
||||
|
@ -199,7 +199,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (openvpn_io::system_error& e)
|
||||
{
|
||||
OPENVPN_LOG_UDPLINK_ERROR("UDP send error: " << e.what());
|
||||
OPENVPN_LOG_UDPLINK_ERROR("UDP send exception: " << e.what());
|
||||
stats->error(Error::NETWORK_SEND_ERROR);
|
||||
return e.code().value();
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error processing route-metric: " << e.what());
|
||||
OPENVPN_LOG("exception processing route-metric: " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error parsing IPv4 route: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
OPENVPN_LOG("exception parsing IPv4 route: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -424,7 +424,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error parsing IPv6 route: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
OPENVPN_LOG("exception parsing IPv6 route: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -451,7 +451,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error adding remote bypass route: " << addr.to_string() << " : " << e.what());
|
||||
OPENVPN_LOG("exception adding remote bypass route: " << addr.to_string() << " : " << e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -561,7 +561,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error parsing dhcp-option: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
OPENVPN_LOG("exception parsing dhcp-option: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
}
|
||||
}
|
||||
try {
|
||||
@ -584,7 +584,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error setting dhcp-option for proxy: " << e.what());
|
||||
OPENVPN_LOG("exception setting dhcp-option for proxy: " << e.what());
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
@ -606,7 +606,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
if (!quiet)
|
||||
OPENVPN_LOG("Error parsing dhcp-option: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
OPENVPN_LOG("exception parsing dhcp-option: " << o.render(OPT_RENDER_FLAGS) << " : " << e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacDNS: setdns: " << e.what());
|
||||
OPENVPN_LOG("MacDNS: setdns exception: " << e.what());
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
@ -248,7 +248,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacDNS: resetdns: " << e.what());
|
||||
OPENVPN_LOG("MacDNS: resetdns exception: " << e.what());
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacDNSWatchdog::thread_func: " << e.what());
|
||||
OPENVPN_LOG("MacDNSWatchdog::thread_func exception: " << e.what());
|
||||
}
|
||||
cancel_push_timer();
|
||||
}
|
||||
@ -272,7 +272,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("MacDNSWatchdog::push_timer_callback: " << e.what());
|
||||
OPENVPN_LOG("MacDNSWatchdog::push_timer_callback exception: " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("*** TUN BUILDER CAPTURE ERROR: " << e.what());
|
||||
OPENVPN_LOG("*** TUN BUILDER CAPTURE exception: " << e.what());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -83,7 +83,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
OPENVPN_LOG("TunWrap destructor: " << e.what());
|
||||
OPENVPN_LOG("TunWrap destructor exception: " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (openvpn_io::system_error& e)
|
||||
{
|
||||
OPENVPN_LOG_TUN_ERROR("TUN write error: " << e.what());
|
||||
OPENVPN_LOG_TUN_ERROR("TUN write exception: " << e.what());
|
||||
tun_error(Error::TUN_WRITE_ERROR, &e.code());
|
||||
return false;
|
||||
}
|
||||
@ -146,7 +146,7 @@ namespace openvpn {
|
||||
}
|
||||
catch (openvpn_io::system_error& e)
|
||||
{
|
||||
OPENVPN_LOG_TUN_ERROR("TUN write error: " << e.what());
|
||||
OPENVPN_LOG_TUN_ERROR("TUN write exception: " << e.what());
|
||||
tun_error(Error::TUN_WRITE_ERROR, &e.code());
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user