Explorer: Fix misleading success log in explorer program instruction logs (#29735)
Fix indentation and avoid truncation of logs
This commit is contained in:
parent
1d88654116
commit
3d62139a3a
|
@ -95,10 +95,18 @@ export function parseProgramLogs(
|
|||
} else if (log.includes("failed")) {
|
||||
const instructionLog = prettyLogs[prettyLogs.length - 1];
|
||||
instructionLog.failed = true;
|
||||
|
||||
let currText =`Program returned error: "${log.slice(log.indexOf(": ") + 2)}"`;
|
||||
// failed to verify log of previous program so reset depth and print full log
|
||||
if (log.startsWith("failed")) {
|
||||
depth++;
|
||||
currText = log.charAt(0).toUpperCase() + log.slice(1);
|
||||
}
|
||||
|
||||
instructionLog.logs.push({
|
||||
prefix: prefixBuilder(depth),
|
||||
style: "warning",
|
||||
text: `Program returned error: "${log.slice(log.indexOf(": ") + 2)}"`,
|
||||
text: currText
|
||||
});
|
||||
depth--;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue