#9 docscii fails unexpectedly when a required Publican brand is not installed
Opened 5 years ago by jhradile. Modified 5 years ago

When converting a Publican-managed book, docscii blindly assumes that the required brand is installed in the system and tries to copy the title logo from a hard-coded path. Consequently, if the brand is not present in the system, docscii terminates unexpectedly with the following error message:

panic: file not found --/usr/share/publican/Common_Content/fedora/en-US/images/title_logo.svg ascii/Common_Content/images/title_logo.svg

goroutine 1 [running]:
docscii/file.Copy(0xc42010f220, 0x4c, 0xc425a58270, 0x2a, 0x0, 0x0)
        /home/jhradilek/go/src/docscii/file/file.go:36 +0x4b0
docscii/asciiDoc.Doc.Write(0xc421d6a060, 0xc421d6a090, 0xc421d6a0c0, 0xc421d6a0f0, 0xc4224260a0, 0x4, 0x4, 0x7ffd9dbd2d3e, 0x5)
        /home/jhradilek/go/src/docscii/asciiDoc/asciidoc.go:60 +0x16b
        /home/jhradilek/go/src/docscii/main.go:64 +0x433

I don't think that a missing title image is a good enough reason for the tool to fail and would expect it to complain but complete the conversion without it.

Login to comment on this ticket.