Questions on the internal error messages of Mathematica.

learn more… | top users | synonyms

8
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 ...
33
votes
4answers
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 ...
22
votes
3answers
710 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 ...
16
votes
2answers
3k 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 ...
11
votes
3answers
412 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
229 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 ...
14
votes
1answer
155 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
89 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
148 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 ...
0
votes
2answers
90 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 ...