diff --git a/src/LyX.cpp b/src/LyX.cpp index 88ebfd468e..e929bb49b6 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -284,10 +284,15 @@ int LyX::exec(int & argc, char * argv[]) // Minimal setting of locale before parsing command line try { init_package(os::utf8_argv(0), string(), string(), - top_build_dir_is_one_level_up); + top_build_dir_is_one_level_up); } catch (ExceptionMessage const & message) { - LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_); - } + if (message.type_ == ErrorException) { + Alert::error(message.title_, message.details_); + lyx_exit(1); + } else if (message.type_ == WarningException) { + Alert::warning(message.title_, message.details_); + } + } locale_init(); // Here we need to parse the command line. At least @@ -296,8 +301,8 @@ int LyX::exec(int & argc, char * argv[]) try { init_package(os::utf8_argv(0), - cl_system_support, cl_user_support, - top_build_dir_is_one_level_up); + cl_system_support, cl_user_support, + top_build_dir_is_one_level_up); } catch (ExceptionMessage const & message) { if (message.type_ == ErrorException) { Alert::error(message.title_, message.details_);