29
votes
Accepted
How do I disable the stack tracing feature in Mathematica 11?
Is there a possibility to disable stack tracing, but keep messages?
Internal`$MessageMenu = False
reverts back to the old messages. Seems to do the trick and ...
26
votes
How do I disable the stack tracing feature in Mathematica 11?
Analysis current as of Mathematica version 11.0.1 and 11.1.0.
We can disable the Show Stack Trace item in the new message menu as follows:
...
23
votes
How to catch complete error message information, including the message text as it would be printed?
In version 10 or later, we can use EvaluationData.
EvaluationData[1/0; 0^0]
Behind the scenes, this uses handlers, like in my ...
16
votes
Accepted
Histogram with Error bars
For the case where the height function is "Count", we can use the formula from the linked page in a custom ChartElementFunction ...
14
votes
Accepted
Would it be a good idea to use Failure and FailureQ in own code
What I personally usually do is to still use $Failed / exceptions when a returned $Failed / thrown exception can't be used ...
14
votes
Accepted
Unit tests for Graphics or FE boxes
This has been partially answered before, so here I will highlight some of its evolution since that previous answer. VerificationTest and its ...
10
votes
Accepted
How to disable roundoff error tracking in arbitrary precision arithmetic?
There are a few reasonable ways. I'll illustrate with an example of Newton iterations for square roots, take from this MathGroup post
...
10
votes
Why do I get number with Precision larger than error estimate?
Consider any numerical integration method $I^*(f,a,b)$ that approximates the exact integral $I$ of a function $f$ over an interval $[a,b]$. It will be implemented by a computation represented by, say, ...
10
votes
Accepted
Adding Trace produces error messages
Short Version
The ultimate cause of this problem is an evaluation leak that occurs when an expression of the form MakeBoxes[StringForm[...]] is evaluated.
Longer ...
9
votes
Saving a log file if an error occurs
I think Internal`WithLocalSettings is the tool you want to use. The syntax is:
...
8
votes
Accepted
Raise Warning/Error on invalid Matrix Addition and Multiplication
That would mean to remove the Listable attribute from Plus. You could do it as follows, but I would not recommend that.
...
7
votes
Accepted
Goal optimization: finding the best combination of capacitors and resistors resulting in given properties
Assume that you have your lists of unique resistor values (resistors) and of unique capacitor values (capacitors). For now, I ...
7
votes
Accepted
Solution of a System of Equations Using `Solve`
I think that that the key feature is to use the MaxExtraConditions option for the Solve command.
In elaborate answer of Artes ...
6
votes
Accepted
How to plot a function whose constant parameters have associated uncertainties in Mathematica 8.0?
This does what I think you're after, fiddle with options as desired:
...
6
votes
How to get a list of indices at which errors occur during iteration
Here's one way to do it:
a = {1, 2, 3, 4, 5}; b = {2, 0, 40, 5, 0};
x = Quiet[Table[a[[i]]/b[[i]], {i, 1, 5}]];
Position[x, ComplexInfinity]
{{2}, {5}}
...
6
votes
Accepted
6
votes
Accepted
How to detect errors that happen in the FrontEnd?
Just to formally answer the question.
This question is a full duplicate of an older question:
MathKernel doesn't return all Messages
where a solution was provided by rcollyer:
To access the ...
Community wiki
5
votes
Accepted
How to output (anything) if any error happens
Do[
Check[{i/i, 1/(i - 5)}, Print@i],
{i, -10, 10}] // Quiet
0
5
5
votes
Accepted
SystemException["MemoryAllocationFailure", ...] with NMaximize
This error should probably be reported to WRI as a bug, most likely in Experimental`NumericalFunction; you should not be seeing this come back up to the top level. ...
Community wiki
5
votes
Accepted
How to track accumulated error?
compare against a higher precision calculation
n = 100000;
ListPlot[Log[10,
Abs[Accumulate@Tan[N[Range[n]]] -
Accumulate@Tan[N[Range[n], 1000]]]]]
5
votes
Accepted
DSolve running forever
I do not know what you mean here. When I run (with $\omega=\sqrt{k/m}$):
DSolve[{y''[t] + \[Omega]^2 y[t] == 1/m Sin[\[Omega] t],
y'[0] == 1, y[0] == 0}, y, t]
...
4
votes
Why do I get number with Precision larger than error estimate?
[Too long to type as a comment, but here is why PrecisionGoal is relevant]
Any number has a precision, and Precision[arb16] ...
4
votes
How to get a list of indices at which errors occur during iteration
Another way (see How to catch complete error message information, including the message text as it would be printed? for more ways to hack messages): This works because ...
4
votes
Accepted
Automatically detect largest interval over which NDSolve can find a solution
NDSolve has already detected the largest such intervals for you, which is why the resulting InterpolatingFunctions have ...
4
votes
Accepted
Dealing with errors and resuming the code after one
Check:
Check[expr, failexpr] evaluates expr, and returns the result,
unless messages were generated, in which case it evaluates and returns
failexpr.
...
4
votes
Histogram with Error bars
This answer below is not directly what you asked but rather about what you should consider doing. With more than 50 or so data points you should consider avoiding histograms completely. More often ...
4
votes
Accepted
Avoiding a for loop to create a list
You're creating pairs {m,h} where each pair really only depends on the previous pair. That's perfect for NestWhileList. ...
4
votes
Accepted
How can I properly use Catch[] to prevent my program from quitting?
It looks like you're using a single-arg Catch. Single-arg Catch will not catch a multi-arg ...
4
votes
Accepted
Catching NDSolve Singularities
You can monitor the step size. It will be "effectively zero" well before it is zero. The code below does not quite do what you want, I think, because it cannot trap ...
4
votes
How to detect errors that happen in the FrontEnd?
According to the Documentation for ErrorBox,
In our case the ErrorBox is implicit, i.e. is generated by the FrontEnd upon ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error-tracking × 85warning-messages × 31
numerical-integration × 10
plotting × 9
differential-equations × 8
message-coding × 8
equation-solving × 7
debugging × 7
error-trapping × 7
graphics × 5
numerics × 5
programming × 5
calculus-and-analysis × 3
front-end × 3
parallelization × 3
kernel × 3
list-manipulation × 2
functions × 2
bugs × 2
mathematical-optimization × 2
notebooks × 2
data × 2
core-language × 2
memory × 2
undocumented × 2