better webdriver error printing

This commit is contained in:
Jeong YunWon committed 2025-03-27 01:28:34 +09:00
1 parent 7f94c10be7
commit 2d4eec88d3
2 files changed
+14 -1

No files matched your search

+8 -1
View File
@@ -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({
+6
View File
@@ -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