home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1896 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.2 KB  |  27 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
  3. From: karl@NeoSoft.com (Karl Lehenbauer)
  4. Subject: Re: Aborting command interpreting
  5. Organization: NeoSoft Communications Services -- (713) 684-5900
  6. Date: Thu, 19 Nov 1992 20:15:20 GMT
  7. Message-ID: <BxzC9o.967@NeoSoft.com>
  8. References: <1992Nov19.173522.20259@novell.com>
  9. Lines: 16
  10.  
  11. In article <1992Nov19.173522.20259@novell.com> Duane Murphy <damurphy@wc.novell.com> writes:
  12. >I am looking for a clean way of being able to abort the Tcl interpreter 
  13. >while it is interpreting a script. ...
  14.  
  15. >The idea would be to force the execution of a particular command to return an 
  16. >error.  This (usually) causes the script to stop.
  17. >Any ideas, comments, suggestions?
  18.  
  19. Extended Tcl has signal trapping.  You normally get a stack backtrace and
  20. error exit, although it can be caught with "catch".  The signal command
  21. (From extended tcl, do a "help extended/signal") will let you ignore signals,
  22. get the default action, trap them where a specified routine is called as soon
  23. as it is safe to do so, or get the catchable error generated.
  24. -- 
  25. -- Email info@NeoSoft.com for info on getting interactive Internet access.
  26. "Turn on your hot tub by email now.  Ask me how."
  27.