An error inside a klammer is reported at your document; the image search path
Assembled from development commit 632297b7657a. Since 1b00738: when something
goes wrong while a klammer is being applied, the report begins with the
line of your document that applied it, then lists the klammers being
applied and where inside the klammer set the fault was raised; the
Python binding's line and column are the application's too. The default
image search path is the document's directory, imgsrc beside it and
../imgsrc, and a not-found report shows exactly those.
This commit is contained in:
1 parent
1b00738654
commit
5c29da52dc
9 files changed
+135
-15
No files matched your search
+11
-1
@@ -857,7 +857,17 @@ void Machine::apply_klammer_registry(
|
||||
{
|
||||
(void)K::log(3, "Klammer");
|
||||
std::string name = trim_char(begin->m_text, '@');
|
||||
katom_list applied_katoms = apply_klammer(klammer_registry.m_klammers[name], target, begin, end);
|
||||
katom_list applied_katoms {};
|
||||
try {
|
||||
applied_katoms = apply_klammer(klammer_registry.m_klammers[name], target, begin, end);
|
||||
} catch (Error& e) {
|
||||
// The error escapes through this application: record it, so that the
|
||||
// report can headline the user's document and show the chain, then
|
||||
// let it go on unwinding (the exception object itself is what the
|
||||
// outer handlers and the commands see).
|
||||
e.m_applications.emplace_back(name, begin->m_loc);
|
||||
throw;
|
||||
}
|
||||
for (auto& k : applied_katoms) {
|
||||
if (k.m_type == katom_t::bar || k.m_type == katom_t::double_bar || k.m_type == katom_t::option_name) {
|
||||
k.m_type = katom_t::text;
|
||||
|
||||
Reference in new issue
Block a user