This question led to a new package:
hardwrap
In writing error messages and warnings for a package/class, I find it a pain to manually insert \MessageBreaks so that words don't get cruelly bisected because of TeX's max_print_line value (which typically is set to 79). In some cases it's not possible to predict where the \MessageBreak should go because a macro in the warning/error message may be expanded to any length of string.
I'd like to have a macro that would take my warning/error message, expand it (so that any macros are expanded to plain strings), and insert \MessageBreaks in the appropriate places based on the value of max_print_line and LaTeX's per-line prefixes (Package <XXX> Warning: and similar).
(If the value of max_print_line can't be accessed from within TeX, I'd settle for just implementing a greedy word-wrap algorithm with the default line length values.)
Follow-up: Will Robertson and I created the hardwrap package to achieve the desired affect.
silencepackage to see how it parses and conditionally removes selected error and warning lines from the output stream. (Apropos of nothing, it's one of my "must have" add-ins during draft document construction.) – Geoffrey Jones Oct 01 '10 at 14:02