Questions tagged [error-tracking]
The error-tracking tag has no usage guidance.
19
questions
27
votes
5
answers
2k
views
How to catch complete error message information, including the message text as it would be printed?
If I evaluate this expression:
Module[{}, 1/0;0^0]; msg = $MessageList
I get:
...
62
votes
2
answers
3k
views
Mathematica Debuggability
One of the things that I really dislike about Mathematica is its lack of debuggability compared to many other programming languages. Some of the problems arises from the functional nature of ...
11
votes
3
answers
496
views
How to write a function-defining function which stores the function arguments in a stack?
I have a function-defining function
SetAttributes[DefFn, HoldAll];
DefFn[f_[args___], body_] :=
f[args] := body;
I am trying to modify this function to record ...
19
votes
2
answers
594
views
MathKernel doesn't return all Messages
In Mathematica I run this command:
Plot[Sin[x], {x, 1, 15}, GridLines -> error]
It generates a Plot with this error message:
A GridLines specification ...
5
votes
1
answer
252
views
Dealing with errors and resuming the code after one
How can I write my Mathematica code so that it resumes at a specific place if any Message is displayed during the execution of an expression? For example, in Visual ...
36
votes
2
answers
1k
views
How do I disable the stack tracing feature in Mathematica 11?
Bug was introduced in 11.0 and persisting through 11.1
It looks like the Mathematica 11 stack tracing feature (see red ellipsis in front of any warning message) prevents the garbage collector from ...
4
votes
1
answer
253
views
How to disable roundoff error tracking in arbitrary precision arithmetic?
In my calculations I need some larger precision. But due to the fact that I iteratively refine the results to compensate for rounding errors accumulated in previous iteration, Mathematica's arbitraty ...
4
votes
2
answers
5k
views
SystemException["MemoryAllocationFailure", ...] with NMaximize
I have a complicated analytical expression that needs to be maximized with respect to a parameter t:
...
11
votes
2
answers
258
views
What is the simplest way to determine which call to a superfunction has generated a Message?
I have a complicated function which contains many calls to NIntegrate, NSolve, FindRoot and ...
6
votes
1
answer
21k
views
How do I troubleshoot when I get a Part::partd or a Part::partw error?
Mathematica has produced the following error message:
Part::partd: Part specification ... is longer than depth of object?
What is partd?
I think I may have ...
12
votes
1
answer
219
views
Adding Trace produces error messages
This is very strange. As I was trying to debug this problem, I noticed when I add Trace then I get lots of internal errors generated. This also happens the first ...
4
votes
1
answer
122
views
Show error messages from collapsed sections
I've got a fairly long notebook. I like to have most of the sections collapsed. If I evaluate the entire notebook I don't see errors in the collapsed sections unless I expand them. I did see that I ...
4
votes
0
answers
241
views
How can you link Parallel Mapping and Error tracking
Following this question and the comments made, together with the information in this question, the following code allows error tracking and debugging very nicely.
...
3
votes
1
answer
711
views
How to plot a function whose constant parameters have associated uncertainties in Mathematica 8.0?
Let's assume I want to plot the function $f(x)=a + bx+ cx^{2}$, where experimentally known values of parameters $a, b$ and, $c$ are as follows:
$a=1.01 \pm 0.18$
$b=0.92 \pm 0.11$
$c=2.2 \pm 0.2$
...
1
vote
1
answer
192
views
How to count the actual occurence of a warning message in a Do loop?
I am running a lot of simulations to fit a model to randomly generated data. Sometimes the fitting converges properly sometimes it does not, but it will give you the fitting parameters anyway. I would ...
5
votes
1
answer
1k
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 ...
2
votes
0
answers
87
views
Finding and interpreting errors [duplicate]
This sounds like a fairly trivial question, but I can't think of any way to solve it. I am doing an extensive parameter sampling where a set of ODEs is used together with ...
1
vote
1
answer
82
views
Strange error not found in a monte carlo code, Infinite expression 1/0 encountered
I've been trying to code a kinetic monte carlo simulation for a dimerization reaction, 2M ---> D. However I have a kinetic Monte Carlo code for a first order decomposition reaction of AIBN (that's ...
0
votes
0
answers
61
views
customisable error checking, message handling code
I have an iterated computation running in a while loop, which is bound to fail at some point, at which point I want it to stop, e.g.
...