chiark / gitweb /
editor: better error message on paste failure.
authorSimon Tatham <anakin@pobox.com>
Sun, 13 Oct 2024 09:52:47 +0000 (10:52 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 13 Oct 2024 14:04:53 +0000 (15:04 +0100)
Apparently I was incredibly lazy at some point in the past and forgot
to say what the problem was when the paste data couldn't be matched
against the regex.

editor

diff --git a/editor b/editor
index 8ccb1cdc935397f5cc6cf12b29f9cdf1cb1ab334..34159001fc97f3ca6c148877ba455517108acc18 100755 (executable)
--- a/editor
+++ b/editor
@@ -175,7 +175,8 @@ class EditorGui:
         for i in range(YSIZE):
             m = pat.search(s)
             if m is None:
-                print("gronk")
+                print("Unable to interpret selection data {!r} as a "
+                      "Bedstead glyph description".format(s))
                 return
             bitmap.append(int(m.group(0), 8) & ((1 << XSIZE) - 1))
             s = s[m.end(0):]