Fix exception to support unicode (and print url_name).

Part of STUD-868