mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 08:40:58 +00:00
fix: code execution error handling
This commit is contained in:
parent
4efb8638ff
commit
6dedf9885f
@ -165,11 +165,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
result = pyodide.runPython(code);
|
try {
|
||||||
|
result = pyodide.runPython(code);
|
||||||
|
|
||||||
console.log(result);
|
console.log(result);
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
console.log(stderr);
|
console.log(stderr);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error:', error);
|
||||||
|
stderr = error;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$: highlightedCode = code ? hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value : '';
|
$: highlightedCode = code ? hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value : '';
|
||||||
|
Loading…
Reference in New Issue
Block a user