Questions on the internal error messages of Mathematica.
25
votes
4answers
756 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 ...
4
votes
2answers
626 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 ...
16
votes
2answers
2k 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 ...
17
votes
3answers
393 views
+100
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 ...
8
votes
1answer
113 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 ...
13
votes
1answer
92 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 ...
16
votes
3answers
165 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 ...