From de65ac7127ad1583d89af994e330473052a24052 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 24 Jul 2013 16:31:04 -0700 Subject: [PATCH] Fail the script task when page URL load fails It's confusing that specifying a nonexistent file on the command line just gives me a blank page. Until we have a real 404 page let's just crash. --- src/components/script/html/hubbub_html_parser.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index ab8a8956314..2f5591464cf 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -481,6 +481,9 @@ pub fn parse_html(url: Url, debug!("received data"); parser.parse_chunk(data); } + Done(Err(*)) => { + fail!("Failed to load page URL %s", url.to_str()); + } Done(*) => { break; }