12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import os
- import sys
- import traceback
- from settings import oscalls
- def show():
-
-
-
- message = str(traceback.format_exc())
-
- print(message)
-
-
-
- Filename = "run.py"
- for i in message.split("\n"):
- if 'File "' in i:
- Filename = i[i.find('"')+1:i.replace('"'," ",1).find('"')]
-
-
- try:
- from gi.repository import Gtk
-
-
- dialogWindow = Gtk.MessageDialog(
-
- flags=0,
- message_type=Gtk.MessageType.WARNING,
- buttons=("Edit Source",1, "Report Bug", 2, "Ignore", 3),
- text="BUG :(\n\n"+message,
- )
- response = dialogWindow.run()
-
-
- if response == 1:
- oscalls.Open(Filename)
-
- elif response == 2:
- oscalls.Open("https://notabug.org/jyamihud/VCStudio/issues")
-
- dialogWindow.destroy()
-
-
- except:
- raise
-
|