From 792266ea0edfada62642d720c6bddb523de791a5 Mon Sep 17 00:00:00 2001 From: Induwara Jayaweera <62927268+Dev-I-J@users.noreply.github.com> Date: Thu, 17 Dec 2020 18:50:12 +0530 Subject: [PATCH] v1.6.11 - Improve Fatal Error Dialog [build] --- .debug/jnote.py | 30 +++++++++++++++--------------- README.md | 2 +- data/about.html | 2 +- fileio.py | 20 ++++++++++---------- jnote.py | 30 +++++++++++++++--------------- main.qml | 8 ++++++-- settings.py | 16 ++++++++-------- settings.toml | 2 +- signals.py | 2 +- vars.iss | 2 +- 10 files changed, 59 insertions(+), 55 deletions(-) diff --git a/.debug/jnote.py b/.debug/jnote.py index 70b1452..77afa85 100644 --- a/.debug/jnote.py +++ b/.debug/jnote.py @@ -34,7 +34,7 @@ def checkUpdates(self, isStartup: bool) -> None: "https://api.github.com/repos/Dev-I-J/JNote/releases/latest" ) with get(url) as r: - currentVersionStr: str = "v1.6.9" + currentVersionStr: str = "v1.6.11" currentVersion: Version = Version(currentVersionStr) newVersionStr: str = r.json()['tag_name'] newVersion: Version = Version(newVersionStr) @@ -58,8 +58,8 @@ def checkUpdates(self, isStartup: bool) -> None: self.apiConnectError.emit() except KeyError: self.apiError.emit() - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) finally: sys.exit() @@ -88,8 +88,8 @@ def findText( return result except re.error as e: self.regexError.emit(pattern, e.msg) - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) return [] @pyqtSlot(bool, str) @@ -100,8 +100,8 @@ def render(self, md: bool, source: str) -> None: with open(name, "w") as tmpFile: tmpFile.write(source if not md else markdown(source)) webbrowser.open_new_tab(name) - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) @pyqtSlot(str) def shellExec(self, script: str) -> None: @@ -120,8 +120,8 @@ def shellExec(self, script: str) -> None: subprocess.run(f"open -W -a Terminal.app {name}") else: self.platformNotSupported.emit(sys.platform) - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) @pyqtSlot() def clean(self) -> None: @@ -135,8 +135,8 @@ def clean(self) -> None: pass except Exception: self.fatalError.emit(traceback.format_exc()) - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) @staticmethod def __addComments() -> None: @@ -163,8 +163,8 @@ def about(self) -> str: except FileNotFoundError: self.readmeFileNotFound.emit() return "data/about.html Not Found." - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) return "" @pyqtProperty(str, constant=True) @@ -177,8 +177,8 @@ def gplLicense(self) -> str: except FileNotFoundError: self.licenseFileNotFound.emit() return "data/license.html Not Found." - except Exception: - self.fatalError.emit(traceback.format_exc()) + except Exception as e: + self.fatalError.emit(str(e), traceback.format_exc()) return "" @pyqtProperty("QVariant", constant=True) diff --git a/README.md b/README.md index b612385..d251191 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ __JNote is a free NotePad__ application written in _Python and QML (PyQt5)._ Bin ## Features -The current version is v1.6.10 and additional for basic functions of a note pad, it can +The current version is v1.6.11 and additional for basic functions of a note pad, it can * Automatically Check For Updates, * Determine A File Is Binary Or Not And Show Message, diff --git a/data/about.html b/data/about.html index f4be364..9db407c 100644 --- a/data/about.html +++ b/data/about.html @@ -6,7 +6,7 @@

JNote - A Free NotePad

JNote Logo

JNote is a free NotePad application written in Python and QML (PyQt5). Binaries are available for Windows and Mac, but you can build from source for Linux (See Below).

Features

-

The current version is v1.6.10 and additional for basic functions of a note pad, it can

+

The current version is v1.6.11 and additional for basic functions of a note pad, it can