Improve qute:foo error message

This commit is contained in:
Florian Bruhin 2014-06-21 23:10:47 +02:00
parent e0bb09cbce
commit fa9dd97f13

View File

@ -90,9 +90,11 @@ class QuteSchemeHandler(SchemeHandler):
try:
handler = getattr(QuteHandlers, path)
except AttributeError:
return ErrorNetworkReply(
request, "No handler found for {}!".format(path),
QNetworkReply.ContentNotFoundError, self.parent())
errorstr = "No handler found for {}!".format(
request.url().toDisplayString())
return ErrorNetworkReply(request, errorstr,
QNetworkReply.ContentNotFoundError,
self.parent())
else:
data = handler()
return SpecialNetworkReply(request, data, 'text/html', self.parent())