Provide an error message for URL parse failure

This commit is contained in:
Keegan McAllister 2014-02-11 14:25:09 -08:00
parent d723798298
commit 8a7cc86aa9

View file

@ -81,7 +81,7 @@ pub fn parse_url(str_url: &str, base_url: Option<Url>) -> Url {
}; };
// FIXME: Need to handle errors // FIXME: Need to handle errors
url::from_str(str_url).unwrap() url::from_str(str_url).ok().expect("URL parsing failed")
} }
#[cfg(test)] #[cfg(test)]