MathGroup Archive 2004

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

Search the Archive

Re: Re: Finding errors in my code?

  • To: mathgroup at
  • Subject: [mg48212] Re: [mg48192] Re: Finding errors in my code?
  • From: schmitther at (Hermann Schmitt)
  • Date: Tue, 18 May 2004 04:16:25 -0400 (EDT)
  • References: <c7kleo$2kr$> <>
  • Sender: owner-wri-mathgroup at

----- Original Message -----
From: "Narasimham G.L." <mathma18 at>
To: mathgroup at
Subject: [mg48212] [mg48192] Re: Finding errors in my code?

> Jonathan Greenberg <greenberg at> wrote in message
news:<c7kleo$2kr$1 at>...
> > -- is there a way to get Mathematica 5 more descriptive
> > error outputs (e.g. Having it recite back which line of code, or which
> > command caused the error in question)?
> Perhaps all Mathematica users would appreciate it. A pointer to the
> source of error is more important than an enumeration of NFE's (non
> fatal errors).
> Also, an ineffective ditto command echo without any helpful diagnostic
> remarks frustrates early entrants to Mathematica ; when its probable
> ineffectiveness in a particular case and/or their own error cannot be
> established, such an undirected echo appears temporarily impolite.
> Hoping this comment would be taken in the proper spirit.

The following shows, how - in my opinion - the error handling could be
changed easily, in order that it gets easier for the programmer to find the
Hermann Schmitt

Print["\nInvocation of Functions in Packages"];
Print["Before Invocation of  EasterSunday"];
Print["$Context: ", $Context];
Print["$ContextPath: "ContextPath];
Print["Packages: ", $Packages];
Print["Date of Easter Sunday 2004: ", pck["Miscellaneous`Calendar`"] @
Print["After Invocatin of  EasterSunday"]];
(* error 1 *)
Print[["$Context: ", $Context];
Print["$ContextPath: ", $ContextPath];
Print["Packages: ", $Packages];
  Print["\nEnd of Program"];

Invocation of Functions in Packages
Before Invocation of  EasterSunday
$Context: Global`
$ContextPath:  ContextPath
Packages: {oosys`, Miscellaneous`Calendar`, Global`, System`}
Date of Easter Sunday 2004: {2004, 4, 11}

Error 1:
Syntax::bktx: "Print["After Invocatin of  EasterSunday"]" has extra "]"
after it.

  • Prev by Date: RE: Re: Finding errors in my code?
  • Next by Date: RE: Re: Kernel init.m File
  • Previous by thread: Re: Finding errors in my code?
  • Next by thread: RE: Re: Finding errors in my code?