mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
fix: code execution error handling
This commit is contained in:
parent
4efb8638ff
commit
6dedf9885f
1 changed files with 9 additions and 4 deletions
|
|
@ -165,11 +165,16 @@
|
|||
}
|
||||
});
|
||||
|
||||
try {
|
||||
result = pyodide.runPython(code);
|
||||
|
||||
console.log(result);
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
stderr = error;
|
||||
}
|
||||
};
|
||||
|
||||
$: highlightedCode = code ? hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value : '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue