sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
21 stars 7 forks source link

General tidy up task: Improve error messaging #885

Closed markpenny closed 8 months ago

markpenny commented 11 months ago

It has been a while since we worked on providing more helpful messages to users when a print job fails to complete. Work on sifting through the latest messages, and perhaps trawl the log file a bit better in order to provide better diagnostic messages for users.

markpenny commented 11 months ago

@davidg-sil I'm wondering if there is an easy way for me to scan through the .tex macro code to get a list of possible error messages (both warnings, and errors) so that I can improve the error messages that we're scanning for at the end of a job (or in a failed job) and so that we can pass on the important ones to users through the status bar pop-up messages.

davidg-sil commented 10 months ago

The code's a bit inconsistent, but in general, look for \message, \errmessage or \MSG - those always produce logging output, so most of it shouldn't be tracing information. If I remember right, \errmessage things actually force a crash.

If I were designing a sane message flagging system, then I'd try to keep things starting ! for errors, and * for warnings, with more of them meaning a more serious problem. But I don't think we've got that. And @mhosken might have other ideas. We've also got a mixture of things that meant 'Expect bad output' and other things which indicate that a crash is about to happen. Maybe we need to review what TeX is saying before you get too specific...