diff --git a/out/locale/en/LC_MESSAGES/default.po b/out/locale/en/LC_MESSAGES/default.po index 578fa32c..1cb6acf6 100644 --- a/out/locale/en/LC_MESSAGES/default.po +++ b/out/locale/en/LC_MESSAGES/default.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: HeidiSQL\n" "POT-Creation-Date: 2012-11-05 21:40\n" -"PO-Revision-Date: 2019-07-14 19:44+0200\n" +"PO-Revision-Date: 2019-07-23 21:57+0200\n" "Last-Translator: Ansgar Becker \n" "Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n" "MIME-Version: 1.0\n" @@ -4764,6 +4764,10 @@ msgstr "Uptime" msgid "unknown" msgstr "unknown" +#. Give the user some hint what he can do with his SSL related connection error +msgid "Please select a different library in your session settings. (Current: \"%s\")" +msgstr "Please select a different library in your session settings. (Current: \"%s\")" + #: main.pas:5261 msgid "Specify filter-value..." msgstr "Specify filter-value..." diff --git a/source/dbconnection.pas b/source/dbconnection.pas index c403c241..eb003528 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -3289,16 +3289,27 @@ var rx: TRegExpr; begin Result := ''; + Additional := ''; + Msg := DecodeAPIString(FLib.mysql_error(FHandle)); - // Find "(errno: 123)" in message and add more meaningful message from perror.exe - rx := TRegExpr.Create; - rx.Expression := '.+\(errno\:\s+(\d+)\)'; - if rx.Exec(Msg) then begin - Additional := MySQLErrorCodes.Values[rx.Match[1]]; - if Additional <> '' then - Msg := Msg + CRLF + CRLF + Additional; + + if SynRegExpr.ExecRegExpr('(Unknown SSL error|SSL connection error)', Msg) then begin + // Find specific strings in error message and provide helpful message + Additional := f_('Please select a different library in your session settings. (Current: "%s")', [FParameters.LibraryFile]); + end else begin + // Find "(errno: 123)" in message and add more meaningful message from perror.exe + rx := TRegExpr.Create; + rx.Expression := '.+\(errno\:\s+(\d+)\)'; + if rx.Exec(Msg) then begin + Additional := MySQLErrorCodes.Values[rx.Match[1]]; + end; + rx.Free; end; - rx.Free; + + if Additional <> '' then begin + Msg := Msg + sLineBreak + sLineBreak + Additional; + end; + case FStatementNum of 0: Result := Msg; 1: Result := f_(MsgSQLError, [LastErrorCode, Msg]);