[BUG_FIXED] Detect the absence of Scintilla.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@786 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/trunk
Don Ho 14 years ago
parent c508aa94ef
commit 505fba9b79

@ -69,8 +69,13 @@ LRESULT Notepad_plus_Window::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPA
{
case WM_CREATE:
{
_notepad_plus_plus_core._pPublicInterface = this;
result = _notepad_plus_plus_core.init(hwnd);
try{
_notepad_plus_plus_core._pPublicInterface = this;
result = _notepad_plus_plus_core.init(hwnd);
} catch (std::exception ex) {
::MessageBoxA(_notepad_plus_plus_core._pPublicInterface->getHSelf(), ex.what(), "Exception On WM_CREATE", MB_OK);
exit(-1);
}
}
break;
default:

@ -153,7 +153,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
{
if (!_hLib)
{
throw std::runtime_error("ScintillaEditView::init : SCINTILLA ERROR - Can not load the dynamic library");
throw std::exception("ScintillaEditView::init : SCINTILLA ERROR - Can not load the dynamic library");
}
Window::init(hInst, hPere);
@ -170,7 +170,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
if (!_hSelf)
{
throw std::runtime_error("ScintillaEditView::init : CreateWindowEx() function return null");
throw std::exception("ScintillaEditView::init : CreateWindowEx() function return null");
}
_pScintillaFunc = (SCINTILLA_FUNC)::SendMessage(_hSelf, SCI_GETDIRECTFUNCTION, 0, 0);
@ -180,12 +180,12 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
if (!_pScintillaFunc)
{
throw std::runtime_error("ScintillaEditView::init : SCI_GETDIRECTFUNCTION message failed");
throw std::exception("ScintillaEditView::init : SCI_GETDIRECTFUNCTION message failed");
}
if (!_pScintillaPtr)
{
throw std::runtime_error("ScintillaEditView::init : SCI_GETDIRECTPOINTER message failed");
throw std::exception("ScintillaEditView::init : SCI_GETDIRECTPOINTER message failed");
}
execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS);

Loading…
Cancel
Save