Questions on the internal error messages of Mathematica.

learn more… | top users | synonyms

17
votes
2answers
3k 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 ...
37
votes
5answers
2k 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 ...
18
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 ...
25
votes
3answers
811 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 ...
19
votes
3answers
708 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
268 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 ...
16
votes
1answer
207 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
106 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
161 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 ...
14
votes
2answers
364 views

Messages leak out from Block

fixed in 10.1 When assigning message to a symbol localized by Block, I would expect that this message is not accessible outside of ...
5
votes
0answers
56 views

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

Behavior remains unchanged through Mathematica version 10.1.0 As noted by kguler the Front End option: MessageOptions -> "MaxMessageCount" does not appear to ...
4
votes
1answer
742 views

Why these (error) messages?

Testing this answer I used: stream = OpenWrite["A:\\out.txt"]; Block[{$Messages = stream}, Mod[1, 2, 3, 4, 5] ] and I was surprised to find that the contents ...
3
votes
2answers
89 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
99 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 ...