Show source line information for the "repl" command

refs #7805
This commit is contained in:
Gunnar Beutner 2014-11-28 06:28:07 +01:00
parent e398b7eccf
commit b61f803d60
1 changed files with 8 additions and 0 deletions

View File

@ -92,6 +92,14 @@ int ReplCommand::Run(const po::variables_map& vm, const std::vector<std::string>
std::cout << ConsoleColorTag(Console_Normal) << "\n";
}
} catch (const ConfigError& ex) {
const DebugInfo *di = boost::get_error_info<errinfo_debuginfo>(ex);
if (di) {
std::cout << String(3 + di->FirstColumn, ' ');
std::cout << String(di->LastColumn - di->FirstColumn + 1, '^');
std::cout << "\n";
}
std::cout << ex.what() << "\n";
} catch (const std::exception& ex) {
std::cout << "Error: " << DiagnosticInformation(ex) << "\n";