disable traceback lines with non-existing files
This commit is contained in:
parent
5039bdfc63
commit
9ed80ec835
@ -84,13 +84,11 @@ events.on("core:open_traceback", function(traceback_b64)
|
|||||||
framestr = framestr.."("..tostring(frame.name)..")"
|
framestr = framestr.."("..tostring(frame.name)..")"
|
||||||
end
|
end
|
||||||
local color = "#FFFFFF"
|
local color = "#FFFFFF"
|
||||||
if frame.source:starts_with("core:") then
|
|
||||||
color = "#C0D0C5"
|
|
||||||
end
|
|
||||||
tb_list:add(gui.template("stack_frame", {
|
tb_list:add(gui.template("stack_frame", {
|
||||||
location=framestr,
|
location=framestr,
|
||||||
color=color,
|
color=color,
|
||||||
callback=callback
|
callback=callback,
|
||||||
|
enabled=file.exists(frame.source)
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
tb_list.size = srcsize
|
tb_list.size = srcsize
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
<label hover-color="#A0A0FF" interactive="true" onclick="%{callback}" color="%{color}">
|
<label hover-color="#A0A0FF" interactive="true" onclick="%{callback}" color="%{color}" enabled="%{enabled}">
|
||||||
%{location}
|
%{location}
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -185,8 +185,16 @@ assetload::postfunc assetload::layout(
|
|||||||
return [=](auto assets) {
|
return [=](auto assets) {
|
||||||
try {
|
try {
|
||||||
auto cfg = std::dynamic_pointer_cast<LayoutCfg>(config);
|
auto cfg = std::dynamic_pointer_cast<LayoutCfg>(config);
|
||||||
|
size_t pos = name.find(':');
|
||||||
|
auto prefix = name.substr(0, pos);
|
||||||
assets->store(
|
assets->store(
|
||||||
UiDocument::read(cfg->env, name, file, "abs:" + file), name
|
UiDocument::read(
|
||||||
|
cfg->env,
|
||||||
|
name,
|
||||||
|
file,
|
||||||
|
prefix + ":layouts/" + name.substr(pos + 1) + ".xml"
|
||||||
|
),
|
||||||
|
name
|
||||||
);
|
);
|
||||||
} catch (const parsing_error& err) {
|
} catch (const parsing_error& err) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
|
|||||||
@ -19,7 +19,7 @@ static fs::path resolve_path(const std::string& path) {
|
|||||||
|
|
||||||
static fs::path resolve_path_soft(const std::string& path) {
|
static fs::path resolve_path_soft(const std::string& path) {
|
||||||
if (path.find(':') == std::string::npos) {
|
if (path.find(':') == std::string::npos) {
|
||||||
return path;
|
return fs::u8path("");
|
||||||
}
|
}
|
||||||
return engine->getPaths()->resolve(path, false);
|
return engine->getPaths()->resolve(path, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user