1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

Write errors while sourcing a file in the debug buffer

This commit is contained in:
Maxime Coste 2013-12-04 00:27:19 +00:00
parent 4a53d11e49
commit e348c35b25

View File

@ -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)