Use the logException function in all places where exception messages are written to the error log

This commit is contained in:
Veronica K. B. Olsen
2021-01-29 18:29:50 +01:00
parent a2f223a992
commit 89ba4aeeaf
11 changed files with 72 additions and 63 deletions
+4 -2
View File
@@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import nw
import logging
import os
@@ -179,8 +180,9 @@ class NWTree():
outFile.write("\n".join(tocList))
outFile.write("\n")
except Exception as e:
logger.error(str(e))
except Exception:
logger.error("Could not write ToC file")
nw.logException()
return False
return True