docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  ObjectScript Reference  /  ObjectScript Special Variables

ObjectScript Reference
$THROWOBJ
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Contains the OREF from an unsuccessful THROW.
Synopsis
$THROWOBJ
Description
$THROWOBJ contains the object reference (OREF) thrown by the most recent unsuccessful THROW operation. InterSystems IRIS writes an OREF to $THROWOBJ when it issues a <THROW> error. Commonly, this occurs when attempting to issue a THROW when not inside a TRY or CATCH block.
A successful THROW operation resets $THROWOBJ to the empty string.
For information on TRY, THROW, and CATCH, see “The TRY-CATCH Mechanism” in the “Error Processing” chapter of Using ObjectScript.
For information on OREFs, see “OREF Basics” in Defining and Using Classes.
Setting $THROWOBJ
You can also explicitly reset $THROWOBJ as follows:
  SET $THROWOBJ=""
$THROWOBJ cannot be set to any value other than the empty string using the SET command. Attempting to do so results in a <ILLEGAL VALUE> error.
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-09-18 06:56:43