The tag has no usage guidance.

learn more… | top users | synonyms

14
votes
5answers
659 views

How to catch complete error message information

If I evaluate this expression: Module[{}, 1/0;0^0]; msg = $MessageList I get: ...
50
votes
2answers
2k 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 ...
9
votes
3answers
363 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 ...
17
votes
2answers
410 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 ...
2
votes
1answer
4k 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 ...
3
votes
2answers
679 views

SystemException[“MemoryAllocationFailure”, …] with NMaximize

I have a complicated analytical expression that needs to be maximized with respect to a parameter t: ...
4
votes
1answer
160 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 ...
10
votes
2answers
152 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 ...
11
votes
1answer
148 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
1answer
169 views

Goal optimization: finding the best combination of capacitors and resistors resulting in given properties

I want to edit @MarcoB answers (because the code he gave doesn't answer the question appropriately)->(the function that need to be optimised is not implemented as asked) But it seems like I am having ...
1
vote
1answer
84 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 ...
4
votes
1answer
973 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
0answers
76 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 ...