mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
better webdriver error printing
This commit is contained in:
1 parent
7f94c10be7
commit
2d4eec88d3
2 files changed
+14
-1
No files matched your search
@@ -21,7 +21,14 @@ import('rustpython')
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Error importing `rustpython`:', e);
|
||||
document.getElementById('error').textContent = e;
|
||||
let errorDetails = e.toString();
|
||||
if (window.__RUSTPYTHON_ERROR) {
|
||||
errorDetails += '\nRustPython Error: ' + window.__RUSTPYTHON_ERROR;
|
||||
}
|
||||
if (window.__RUSTPYTHON_ERROR_STACK) {
|
||||
errorDetails += '\nStack: ' + window.__RUSTPYTHON_ERROR_STACK;
|
||||
}
|
||||
document.getElementById('error').textContent = errorDetails;
|
||||
});
|
||||
|
||||
const fixedHeightEditor = EditorView.theme({
|
||||
|
||||
@@ -102,6 +102,12 @@ def wdriver(request):
|
||||
driver._print_panic()
|
||||
driver.quit()
|
||||
raise
|
||||
except Exception as e:
|
||||
print(f"Error waiting for page to load: {e}")
|
||||
# Check the page source to see what's loaded
|
||||
print("Page source:", driver.page_source[:500])
|
||||
driver.quit()
|
||||
raise
|
||||
|
||||
yield driver
|
||||
|
||||
|
||||
Reference in new issue
Block a user