Linked Questions

2 votes
1 answer
403 views

How to store error message from a command into a variable [duplicate]

I am inserting data into server using SQLInsert. I want to store the error messages i encounter when data is not inserted. Apparently the error output is different ...
user13892's user avatar
  • 9,113
0 votes
0 answers
39 views

How can I use WhenEvent to stop the integration? [duplicate]

I have a questions about stopping the integration. I calculate the function as the following. It gives the message: "At NN=58.7035438......, the step size is effectively zero; singularity or stiff ...
Ellgan's user avatar
  • 49
1 vote
0 answers
34 views

How to authomatically extract info from error messages [duplicate]

I am using NDSolve to compute particles' trajectories. Typically, I get an error of the type: NDSolve::ndsz: At t == 0.11880535502829011`, step size is effectively zero; singularity or stiff system ...
AndreaPaco's user avatar
0 votes
0 answers
30 views

How to copy a number from an error message? [duplicate]

Is there any way to copy a number from an error message and assign it to a variable, without manually doing it? For instance, I am trying to solve some coupled Differential equations as follows: ...
surujjd's user avatar
  • 83
88 votes
6 answers
6k views

How to abort on any message generated?

Mathematica is a bit unusual as a programming language because it never stops on messages, regardless of whether the message is an error, a warning or just an informative message. It simply prints the ...
Szabolcs's user avatar
  • 233k
30 votes
3 answers
1k views

Prepend Information to Warning Messages

I have a function running within a Do loop that sometimes issues a warning. I'd like to prepend the warning with the loop ctr so that I can go back and debug that instance later. Basically, I would ...
Chris Roth's user avatar
9 votes
3 answers
2k views

Need help with exception handling

I have read the docs for Catch, Throw, and friends multiple times, and I confess that I find them utterly incomprehensible... ...
kjo's user avatar
  • 11.7k
12 votes
1 answer
324 views

Retrieving the text of a message

Is there a simple, built-in way to retrieve the text of a message, given it's identifier (such as Power::infy)? The documentation describes how ...
Szabolcs's user avatar
  • 233k
4 votes
5 answers
205 views

How to get a list of indices at which errors occur during iteration

I have been looking at some of the questions regarding error handling but i think my problem is unique. I am running a Do-loop. I get errors only for certain values of the loop variable due to the ...
no-one's user avatar
  • 1,225
9 votes
3 answers
250 views

Detect Messages within an expression without losing the return value?

I know that Check[expr,failexpr] is a mechanism to catch messages. The problem with it is that if a message is generated within ...
a06e's user avatar
  • 11.1k
3 votes
2 answers
312 views

How to get the error information after run a wrong expression

If we run this code: FindCycle[1, 2, 3, 4, 5] It will give a error information like: How to get the error info promption of ...
yode's user avatar
  • 26.3k
8 votes
1 answer
1k views

How to stop Mathematica from turning off warning messages in a loop?

I'm using NonLinearModelFit on a large set of data and which contains a nested Do-loop. I'd like to see all of the cases where there is an issue with the non-linear ...
Tom Mozdzen's user avatar
2 votes
1 answer
1k views

How to record all the output (including error messages) of a mathematica script in a file?

Is it possible to record all the output of a Mathematica script to a file? I am looking for the Mathematica equivalent of ...
Sumit's user avatar
  • 15.9k
4 votes
1 answer
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 ...
Pankaj Sejwal's user avatar
4 votes
1 answer
657 views

Plot an undefined function

When I plotted an undefined function, Mathematica also spends considerable time to process it. It returns a blank figure necessarily. What confuses me is where the ...
cmc's user avatar
  • 721

15 30 50 per page