2025-03-18 19:28:35 +01:00
|
|
|
<!DOCTYPE html>
|
2024-07-04 00:28:49 +09:00
|
|
|
<script src="../include.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
test(() => {
|
2024-10-04 16:11:00 -06:00
|
|
|
removeTestErrorHandler()
|
|
|
|
|
|
2024-07-04 00:28:49 +09:00
|
|
|
window.onerror = (message, filename, lineno, colno, error) => {
|
|
|
|
|
println(`message = ${message}`);
|
|
|
|
|
println(`lineno = ${lineno}`);
|
|
|
|
|
println(`colno = ${colno}`);
|
|
|
|
|
println(`error = ${error}`);
|
2024-07-07 15:57:34 +01:00
|
|
|
// We can't simply print the filename because it is the full path to the active script, which varies between machines.
|
|
|
|
|
const filenameURL = new URL(filename);
|
|
|
|
|
println(`filename URL scheme = ${filenameURL.protocol}`);
|
|
|
|
|
println(`filename URL final path segment = ${filenameURL.pathname.split('/').pop()}`);
|
2024-07-04 00:28:49 +09:00
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
window.reportError(new Error('Reporting an Error!'));
|
|
|
|
|
});
|
|
|
|
|
</script>
|