Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Capturing error messages

  • To: mathgroup at
  • Subject: [mg27302] Re: Capturing error messages
  • From: "Paul Lutus" <nospam at>
  • Date: Tue, 20 Feb 2001 03:05:12 -0500 (EST)
  • References: <96q2f5$>
  • Sender: owner-wri-mathgroup at

<bbongiorno at> wrote in message news:96q2f5$mrv at
> Gentlepeople,
> How can I program a routine that captures error messages and instead of
> the "indeterminate" or "1/0" blue "bell" messages, it can show a string
> "na".
> Additionally, when a statistical function cannot work, it can show "na"
> instead of reproducing the function command line.

WRT error messages, you have two choices:

1. Turn off the message:


2. Change the message text:

s::tag = "your custom message."


Power::infy = "Hey! You can't do that!"


Power::infy: Hey! You can't do that!

Paul Lutus

  • Prev by Date: 2001 Mathematica Developer Conference
  • Next by Date: avoiding neg values in NDSolve
  • Previous by thread: 2001 Mathematica Developer Conference
  • Next by thread: avoiding neg values in NDSolve