ossl.c: NULL check
* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown error reasons with old OpenSSL, and insert a colon iff formatted message is not empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5e4ac976b0
commit
89e70fe8e7
@ -1,3 +1,9 @@
|
|||||||
|
Wed Mar 5 11:58:30 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
|
||||||
|
error reasons with old OpenSSL, and insert a colon iff formatted
|
||||||
|
message is not empty.
|
||||||
|
|
||||||
Wed Mar 5 00:42:00 2014 Kazuki Tsujimoto <kazuki@callcc.net>
|
Wed Mar 5 00:42:00 2014 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"
|
* ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"
|
||||||
|
@ -312,10 +312,11 @@ ossl_make_error(VALUE exc, const char *fmt, va_list args)
|
|||||||
else
|
else
|
||||||
msg = ERR_reason_error_string(e);
|
msg = ERR_reason_error_string(e);
|
||||||
if (NIL_P(str)) {
|
if (NIL_P(str)) {
|
||||||
str = rb_str_new_cstr(msg);
|
if (msg) str = rb_str_new_cstr(msg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_str_cat2(rb_str_cat2(str, ": "), msg);
|
if (RSTRING_LEN(str)) rb_str_cat2(str, ": ");
|
||||||
|
rb_str_cat2(str, msg ? msg : "(null)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dOSSL == Qtrue){ /* show all errors on the stack */
|
if (dOSSL == Qtrue){ /* show all errors on the stack */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user