code_junkie

wxPython is not throwing exceptions when it should, instead giving raw error messages

Nov 13th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. NewProject = wx.MenuItem(File, -1, "&New ProjecttCtrl+N", "Create a new project")
  2. try:
  3. # raises an error message but not an exception
  4. NewProject.SetBitmap(wx.Image( <path> ), wx.BITMAP_TYPE_PNG).ConvertToBitmap())
  5. except Exception:
  6. pass
  7.  
  8. dummy_log=wx.LogNull()
Add Comment
Please, Sign In to add comment