parse_url_or_fail function

Parse a character string or throws error if it fails