E5Gui/E5ErrorMessage.py

branch
Py3_only
changeset 4005
69a435ac9067
parent 3160
209a07d7e401
equal deleted inserted replaced
3533:123dd8b3189a 4005:69a435ac9067
105 "E5ErrorMessage", "Critical:") 105 "E5ErrorMessage", "Critical:")
106 elif msgType == QtFatalMsg: 106 elif msgType == QtFatalMsg:
107 messageType = QCoreApplication.translate( 107 messageType = QCoreApplication.translate(
108 "E5ErrorMessage", "Fatal Error:") 108 "E5ErrorMessage", "Fatal Error:")
109 if isinstance(message, bytes): 109 if isinstance(message, bytes):
110 message = message.decode() 110 message = Utilities.decodeBytes(message)
111 message = message.replace("\r\n", "<br/>")\ 111 message = message.replace("\r\n", "<br/>")\
112 .replace("\n", "<br/>")\ 112 .replace("\n", "<br/>")\
113 .replace("\r", "<br/>") 113 .replace("\r", "<br/>")
114 msg = "<p><b>{0}</b></p><p>{1}</p>".format( 114 msg = "<p><b>{0}</b></p><p>{1}</p>".format(
115 messageType, Utilities.html_uencode(message)) 115 messageType, Utilities.html_uencode(message))

eric ide

mercurial