Linked Questions

521
votes
19answers
129k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
58
votes
2answers
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 ...
22
votes
5answers
1k 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: ...
28
votes
4answers
1k views

Resource management in Mathematica

I am using a library that has functions like createSomeObject[] and deleteSomeObject[obj]. It is an interface to a C language ...
10
votes
2answers
2k views

How to switch off all messages?

How can I want to switch off all messages in a Mathematica session? Quiet[expr] allows me to evaluate expr without messages. <...
20
votes
1answer
362 views

How to use Handler functions

It seems that Internal`AddHandler or other functions related to it can be quite helpful sometimes, especially when dealing with messages and such. But the ...
11
votes
2answers
960 views

Avoiding an unresponsive user interface in OS X

I have found that despite Mathematica's numerous updates, each of which have added much functionality, one fundamental issue remains unaddressed: The unresponsiveness of the UI when I make a mistake (...
2
votes
2answers
2k views

Output of a Print in a list

I'just starting with Mathematica and therefore I was having a small question. It must be somewhere on Internet but I can't find it. My question is the following. I would like to get my values after ...
5
votes
2answers
1k views

Detecting changes of variables' values

Is it possible to detect (and create a trigger for) an event when any of the variables defined in the notebook changes its value (for any reason)? I need to know which variable got changed and what ...
8
votes
1answer
634 views

Debugging a $RecursionLimit error?

I sometimes encounter bugs that involve a recursion limit. It's often very hard to find the origin of the problem. Would there be a way to copy the stack somewhere and abort the evaluation in order ...
5
votes
1answer
876 views

Interrupting package evaluation, handling error

I have some packages/scripts that I schedule the execution using Jobs in SQL server. For example, in some of then, I use to create reports and delivery by mail using Mathematica. All done using ...
12
votes
1answer
363 views

Check does not interrupt evaluation of the expression when a Message is emitted

On the surface, Check looks like a good method to use when you need to abort the evaluation of an expression whenever a Message ...
3
votes
3answers
223 views

Is it possible to assign numbers generated in an Error-Message?

If I have a differential equation of the form: ...
6
votes
2answers
425 views

How to choose variables from a list for a function and then use the solution in a subsequent function?

I am trying to calculate heating degree days and cooling degree days and output that information to a table. I am using mathematica's curated data to do this. In text this is what I would like to do....
4
votes
1answer
1k views

Exception/Error handling using returns codes

There is good explanation available for error handling on this and similar links. Here there is information on handling inappropriate input arguments and handling unprocessed functions using ...

15 30 50 per page