Is there a simple, built-in way to retrieve the text of a message, given it's identifier (such as Power::infy)?
The documentation describes how Message does this: it looks for different language versions (Power::infy::langname), then it looks under the symbol name (Power::infy), then it looks under General (General::infy), then it uses $NewMessage ... it's pretty complicated.
Is there any built-in, hidden/undocumented way that will let me retrieve the text of a message in a simple way, without issuing the message?
I see two possibilities:
- Reimplement the whole lookup procedure. This is a lot of work.
- Implement a special stream and do something like
Block[{$Messages = ...}, Message[symb::name]]. Also a lot of work (implementing the stream methods), and I'm not even sure it would work.
Or maybe there is an undocumented way. ?*`*Message* gives plenty of symbols, but it's not clear which may be interesting and what they do.
MessageName[sym, name] /. Messages[sym]does not work. And, no I don't understand why. – rcollyer Oct 18 '13 at 14:39