From e348c35b251302b1a923d296d634d278a4acd49d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 4 Dec 2013 00:27:19 +0000 Subject: [PATCH] Write errors while sourcing a file in the debug buffer --- src/commands.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index ca96e6df..1fbf7324 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -440,7 +440,16 @@ void exec_commands_in_file(CommandParameters params, throw wrong_argument_count(); String file_content = read_file(parse_filename(params[0])); - CommandManager::instance().execute(file_content, context); + try + { + CommandManager::instance().execute(file_content, context); + } + catch (Kakoune::runtime_error& err) + { + write_debug("error while executing commands in file '" + params[0] + + "'\n " + err.what()); + throw; + } } static OptionManager& get_options(const String& scope, const Context& context)