check for additional errors
diff --git a/bin/zeroslash.py b/bin/zeroslash.py
index 7c2bccb..a3631bb 100755
--- a/bin/zeroslash.py
+++ b/bin/zeroslash.py
@@ -9,9 +9,15 @@ import argparse
def copyChar(font, sourceCharName, destCharName, encoding=-1):
if not destCharName in font:
+ if encoding < 0
+ raise Exception("%s not found and no encoding specified" % destCharName)
font.createChar(encoding, destCharName)
sourceChar = font[sourceCharName]
+ if not sourceChar:
+ raise Exception("%s not found" % sourceCharName)
destChar = font[destCharName]
+ if not destChar:
+ raise Exception("%s not found" % destCharName)
pen = destChar.glyphPen(replace=True)
sourceChar.draw(pen)
pen = None # finalize pen drawing