Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Return errors from Openvpn layer #25

Open
Waldz opened this issue Oct 4, 2018 · 1 comment
Open

Return errors from Openvpn layer #25

Waldz opened this issue Oct 4, 2018 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Waldz
Copy link
Member

Waldz commented Oct 4, 2018

session := NewSession(&fmtLogger{})
session.Start("", Credentials{})
err := session.Wait()

Problems:

  • Error is not informative, it's always the same
err = "openvpn3 init failed"
  • Detailed error is only in logs:
eval config error: option_error: remote option not specified
  • And in Openvpn layer swallows it:
build/core/adapter/library.cpp:
try {
  if (eval.error) {
    OPENVPN_THROW_EXCEPTION("eval config error: " << eval.message);
  }
} catch (const std::exception &e) {
  callbacks.logCallback(callbacks.usrData, (char *)(e.what()));
}
@Waldz Waldz changed the title Returns errors from Openvpn C layer Returns errors from Openvpn layer Oct 4, 2018
@Waldz Waldz modified the milestone: go-openvpn-mobile-ready Oct 4, 2018
@Waldz Waldz added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 4, 2018
@Waldz Waldz changed the title Returns errors from Openvpn layer Return errors from Openvpn layer Oct 8, 2018
@tadovas
Copy link
Contributor

tadovas commented Jan 28, 2019

Actually it doesn't swallow, but reports it through Log callback - unfortunatelly as simple string

@Waldz Waldz removed this from the Openvpn mobile support (0.?) milestone May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants