예제 #1
0
 def __init__(self, parent, ex, title="Error", **kw):
     kw = KwStruct(kw, bitmap="error")
     text = kw.get("text", "")
     if not text.endswith("\n"):
         text = text + "\n"
     text = text + "\n"
     if isinstance(ex, EnvironmentError) and ex.filename is not None:
         t = "[Errno %s] %s:\n%s" % (ex.errno, ex.strerror, repr(ex.filename))
     else:
         t = str(ex)
     kw.text = text + unicode(t, errors='replace')
     MfxMessageDialog.__init__(self, parent, title, **kw.getKw())
예제 #2
0
 def __init__(self, parent, ex, title="Error", **kw):
     kw = KwStruct(kw, bitmap="error")
     text = str(kw.get("text", ""))
     if text and text[-1] != "\n":
         text = text + "\n"
     text = text + "\n"
     if isinstance(ex, EnvironmentError) and ex.filename is not None:
         t = '[Errno %s] %s:\n%s' % (ex.errno, ex.strerror, repr(ex.filename))
     else:
         t = str(ex)
     kw.text = text + t
     MfxDialog.__init__(self, parent, title, **kw.__dict__)
예제 #3
0
 def __init__(self, parent, ex, title="Error", **kw):
     kw = KwStruct(kw, bitmap="error")
     text = str(kw.get("text", ""))
     if text and text[-1] != "\n":
         text = text + "\n"
     text = text + "\n"
     if isinstance(ex, EnvironmentError) and ex.filename is not None:
         t = '[Errno %s] %s:\n%s' % (ex.errno, ex.strerror, repr(ex.filename))
     else:
         t = str(ex)
     kw.text = text + t
     MfxDialog.__init__(self, parent, title, **kw.__dict__)
예제 #4
0
 def __init__(self, parent, ex, title="Error", **kw):
     kw = KwStruct(kw, bitmap="error")
     text = kw.get("text", "")
     if not text.endswith("\n"):
         text = text + "\n"
     text = text + "\n"
     if isinstance(ex, EnvironmentError) and ex.filename is not None:
         t = "[Errno %s] %s:\n%s" % \
             (ex.errno, ex.strerror, repr(ex.filename))
     else:
         t = str(ex)
     kw.text = text + unicode(t, errors='replace')
     MfxMessageDialog.__init__(self, parent, title, **kw.getKw())