gui: print exception when gen fails

This commit is contained in:
Bonta-kun 2019-12-10 02:15:03 +01:00
parent f479c8dc23
commit 0dcb5ba73b
1 changed files with 3 additions and 0 deletions

3
Gui.py
View File

@ -2,6 +2,7 @@
from argparse import Namespace from argparse import Namespace
from glob import glob from glob import glob
import json import json
import logging
import random import random
import os import os
import shutil import shutil
@ -418,6 +419,7 @@ def guiMain(args=None):
else: else:
main(seed=guiargs.seed, args=guiargs) main(seed=guiargs.seed, args=guiargs)
except Exception as e: except Exception as e:
logging.exception(e)
messagebox.showerror(title="Error while creating seed", message=str(e)) messagebox.showerror(title="Error while creating seed", message=str(e))
else: else:
msgtxt = "Rom patched successfully" msgtxt = "Rom patched successfully"
@ -540,6 +542,7 @@ def guiMain(args=None):
try: try:
adjust(args=guiargs) adjust(args=guiargs)
except Exception as e: except Exception as e:
logging.exception(e)
messagebox.showerror(title="Error while creating seed", message=str(e)) messagebox.showerror(title="Error while creating seed", message=str(e))
else: else:
msgtxt = "Rom patched successfully" msgtxt = "Rom patched successfully"