Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve error message when adding file to X509Store fails #2249
I'm currently trying to investigate an multi-threading issue with JRuby 1.7.16 environment where faraday/httpclient fails to load the CA file under some condition which is difficult to reproduce in development. Unfortunately it's not exactly clear to me what happens here since the error message does not tell anything about the root cause but the configured ca_file definitely exists in my case. It just says:
Looking at the code it seems any exception is caught and only the message is extracted which leads to the 'null' message above.
To reproduce the 'poor' error messsage here a little snippet where I'm passing in a file which does not exist:
It would be helpful to either create a nested exception (to not loose the root cause) or add at least the exception class to the output in case the exception message is null (so I can investigate this problem further).
to get the stacktrace you can add
with jruby-openssl-0.9.6.dev (https://oss.sonatype.org/content/repositories/snapshots/rubygems/jruby-openssl/0.9.6.dev-SNAPSHOT/jruby-openssl-0.9.6.dev-20141003.172537-3.gem) this particular error looks different:
it is related to jruby/jruby-openssl#11