Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg27302] Re: Capturing error messages
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Tue, 20 Feb 2001 03:05:12 -0500 (EST)
  • References: <96q2f5$mrv@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

<bbongiorno at attglobal.net> wrote in message news:96q2f5$mrv at smc.vnet.net...
> 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:

Off[s::tag]

2. Change the message text:

s::tag = "your custom message."

Example:

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

1/0

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

--
Paul Lutus
www.arachnoid.com





  • 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