From 8a7cc86aa9759d7b49f7ba524e2f0d42c96bc59f Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 11 Feb 2014 14:25:09 -0800 Subject: [PATCH] Provide an error message for URL parse failure --- src/components/util/url.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/util/url.rs b/src/components/util/url.rs index 19f5eaaece3..5010c374769 100644 --- a/src/components/util/url.rs +++ b/src/components/util/url.rs @@ -81,7 +81,7 @@ pub fn parse_url(str_url: &str, base_url: Option) -> Url { }; // FIXME: Need to handle errors - url::from_str(str_url).unwrap() + url::from_str(str_url).ok().expect("URL parsing failed") } #[cfg(test)]