Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Re: Finding errors in my code?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48212] Re: [mg48192] Re: Finding errors in my code?
  • From: schmitther at t-online.de (Hermann Schmitt)
  • Date: Tue, 18 May 2004 04:16:25 -0400 (EDT)
  • References: <c7kleo$2kr$1@smc.vnet.net> <200405170722.DAA29594@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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


> Jonathan Greenberg <greenberg at ucdavis.edu> wrote in message
news:<c7kleo$2kr$1 at smc.vnet.net>...
> > -- 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
error.
Hermann Schmitt

<<oosys.m
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`"] @
EasterSunday[2004]];
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?