mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Raise error before LoadLibrary is called, when library file does not exist, so the user gets a more reasonable message
This commit is contained in:
@ -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-23 21:57+0200\n"
|
||||
"PO-Revision-Date: 2019-07-26 20:47+0200\n"
|
||||
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
||||
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -4039,8 +4039,8 @@ msgid "Library %s seems unusable. Please select a different one."
|
||||
msgstr "Library %s seems unusable. Please select a different one."
|
||||
|
||||
#: dbconnection.pas:1392
|
||||
msgid "Cannot find a usable %s. Please launch %s from the directory where you have installed it."
|
||||
msgstr "Cannot find a usable %s. Please launch %s from the directory where you have installed it."
|
||||
msgid "Please launch %s from the directory where you have installed it. Or just reinstall %s."
|
||||
msgstr "Please launch %s from the directory where you have installed it. Or just reinstall %s."
|
||||
|
||||
msgid "Internal error %d: %s"
|
||||
msgstr "Internal error %d: %s"
|
||||
|
@ -7670,6 +7670,14 @@ begin
|
||||
// Load DLL as is (with or without path)
|
||||
inherited Create;
|
||||
FDllFile := DllFile;
|
||||
if not FileExists(FDllFile) then begin
|
||||
msg := f_('File does not exist: %s', [FDllFile]) +
|
||||
sLineBreak + sLineBreak +
|
||||
f_('Please launch %s from the directory where you have installed it. Or just reinstall %s.', [APPNAME, APPNAME]
|
||||
);
|
||||
Raise EdbError.Create(msg);
|
||||
end;
|
||||
|
||||
FHandle := LoadLibrary(PWideChar(FDllFile));
|
||||
if FHandle = 0 then begin
|
||||
msg := f_('Library %s could not be loaded. Please select a different one.',
|
||||
|
Reference in New Issue
Block a user