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 ...
user avatar
  • 4,171
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: ...
user avatar
  • 67.3k
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 ...
user avatar
  • 227k
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 ...
user avatar
  • 350k
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 ...
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 ...
user avatar
  • 33.4k
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 ...
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, ...
user avatar
  • 220k
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 ...
user avatar
  • 67.3k
9 votes

Saving a log file if an error occurs

I think Internal`WithLocalSettings is the tool you want to use. The syntax is: ...
user avatar
  • 125k
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. ...
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 ...
user avatar
  • 61.6k
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 ...
user avatar
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: ...
user avatar
  • 25.1k
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}} ...
user avatar
  • 65.8k
6 votes
Accepted

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

Mmm, something like this? ...
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 output (anything) if any error happens

Do[ Check[{i/i, 1/(i - 5)}, Print@i], {i, -10, 10}] // Quiet 0 5
user avatar
  • 8,382
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. ...
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]]]]]
user avatar
  • 38.4k
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] ...
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] ...
user avatar
  • 25.1k
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 ...
user avatar
  • 220k
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 ...
user avatar
  • 31.9k
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. ...
user avatar
  • 265k
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 ...
user avatar
  • 34.8k
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. ...
user avatar
  • 13.5k
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 ...
user avatar
  • 125k
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 ...
user avatar
  • 220k
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 ...
user avatar

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