Questions on the internal error messages of Mathematica.

learn more… | top users | synonyms

12
votes
2answers
2k views

How do I work with Root objects?

I want to solve the trigonometric equation : $$(3-\cos 4x )\cdot (\sin x - \cos x ) = 2.$$ I tried Solve[(3 - Cos[4*x])*(Sin[x] - Cos[x]) == 2, x] It returns the ...
34
votes
5answers
1k views

How to abort on any message generated?

Mathematica is a bit unusual as a programming language because it never stops on messages, regardless of whether the message is an error, a warning or just an informative message. It simply prints the ...
17
votes
2answers
4k views

Can Reduce *really* not solve for x here?

Sometimes I get the feeling I'm just flailing blindly with Mathematica. Is solving for $x$ in the equation $$ \frac{\cosh (x/2)}{x} = \sqrt{2} $$ really beyond the scope of Mathematica? I try to ...
24
votes
3answers
748 views

Prepend Information to Warning Messages

I have a function running within a Do loop that sometimes issues a warning. I'd like to prepend the warning with the loop ctr so that I can go back and debug that instance later. Basically, I would ...
11
votes
3answers
477 views

How to program a F::argx message?

How useful is it to program a user-built function in a package to produce a red warning message F::argx if you give the wrong number of arguments to that function? ...
17
votes
3answers
243 views

Is there any way to allow a message to appear more than three times before General::stop shuts it off?

I have some Mathematica code that analyzes data in a database and uses Message to report when expected data is missing. By default, Mathematica will allow this ...
15
votes
1answer
177 views

Standard message definition construct

Why are the messages almost always defined like this (at least in packages): If[Not@ValueQ[function::usage], function::usage = "Usage message"] and not just like ...
10
votes
3answers
98 views

How to limit number of user-defined messages issued per evaluation

I have written code such that if it runs into a particular function, a warning message is issued. However, it is common for the program to call this function several times in a single evaluation, but ...
8
votes
1answer
153 views

Retrieving the text of a message

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 ...
5
votes
0answers
48 views

Is “MaxMessageCount” broken or is its function counter-intuitive?

As noted by kguler the Front End option: MessageOptions -> "MaxMessageCount" does not appear to have any affect on the number of times a Message is repeated ...
3
votes
2answers
70 views

How restore printing of messages?

In the upper left hand corner of my message window, the button reads "Delete all messages". I don't get any messages at all. How can I get messages restored.
0
votes
2answers
95 views

Cases Message Valid Notebook Structure

Note: Spelunking will likely be needed. Execute the following. You should get back and error along the lines of First::first:... This error is unimportant except ...