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 ...
ktm's user avatar
  • 4,231
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: ...
WReach's user avatar
  • 68.4k
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 ...
Szabolcs's user avatar
  • 233k
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 ...
kglr's user avatar
  • 384k
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 ...
Leonid Shifrin's user avatar
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 ...
rcollyer's user avatar
  • 33.9k
10 votes

Saving a log file if an error occurs

I think Internal`WithLocalSettings is the tool you want to use. The syntax is: ...
Carl Woll's user avatar
  • 130k
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 ...
Daniel Lichtblau's user avatar
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, ...
Michael E2's user avatar
  • 234k
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. ...
Henrik Schumacher's user avatar
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 ...
MarcoB's user avatar
  • 65.8k
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 ...
Hosein Rahnama's user avatar
7 votes
Accepted

Check applied to list is not the same as list of Check

When you write Check[#, "Failed"] & you are creating a pure Function, which by default does not hold its arguments ...
Jason B.'s user avatar
  • 67.3k
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: ...
ciao's user avatar
  • 25.6k
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}} ...
bill s's user avatar
  • 68.3k
6 votes

How to Quiet[] only the first argument of Check[]?

Mmm, something like this? ...
Anton.Sakovich's user avatar
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 ...
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]]]]]
george2079's user avatar
  • 38.8k
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] ...
José Antonio Díaz Navas's user avatar
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] ...
ilian's user avatar
  • 25.5k
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 ...
Michael E2's user avatar
  • 234k
4 votes
Accepted

How to catch error messages from parallel kernels

Two changes make it work. Collect the messages on each subkernel and alter Message on each subkernel. The messages can be harvested with ...
Michael E2's user avatar
  • 234k
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 ...
JimB's user avatar
  • 40.6k
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. ...
John Doty's user avatar
  • 13.7k
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 ...
Carl Woll's user avatar
  • 130k
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 ...
Michael E2's user avatar
  • 234k
4 votes

How to Quiet[] only the first argument of Check[]?

A simple way to achieve the desired effect would be to write: Quiet@Check[expr, $Failed, {NIntegrate::slwcon}] /. $Failed :> failexpr If we are worried about ...
WReach's user avatar
  • 68.4k
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 ...
Alexey Popkov's user avatar
4 votes

Mathematica flips the sign of a Maclaurin series

The OP should report that when expanding near 0.0000000000000001 General::munfl will be generated and the numerical result is thus untrustable. The reason is as ...
Lacia's user avatar
  • 2,208
4 votes
Accepted

Why is there an error about division by 0?

Answer formed from my comments, which seems to solve the issue: Try Method -> {BDF, "DiscontinuityProcessing" -> None}. Getting a real fix might ...
Michael E2's user avatar
  • 234k

Only top scored, non community-wiki answers of a minimum length are eligible