chiark / gitweb /
m.images: improve a failure message.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 8 Oct 2020 10:51:57 +0000 (12:51 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 8 Oct 2020 11:11:01 +0000 (13:11 +0200)
plugins/m/images.py

index 388d7caeb3e1f885f8c0c15896b90d738ed29edc..d155a026b88a971af01841505b1d8b41864f7e3c 100644 (file)
@@ -187,7 +187,7 @@ class Figure(Image):
             elif not (isinstance(first_node, nodes.comment)
                       and len(first_node) == 0):
                 error = self.state_machine.reporter.error(
-                      'Figure caption must be a paragraph or empty comment.',
+                      'Figure caption must be a paragraph or empty comment, got %s' % type(first_node),
                       nodes.literal_block(self.block_text, self.block_text),
                       line=self.lineno)
                 return [figure_node, error]