Publishing of 1.0.2 failed, trying 1.0.3.
This class allows the user to create a class containing a %Library.Status object. Depending on how the properties of the class are set, the status can throw or log itself as an exception or write out its error text automatically whenever the status goes from $$$OK to an error status.
Instances should be created by calling the New method and providing flags as desired. Available flags are:
Flags can be provided in any order and are not case sensitive.
The following code should create a watched status that writes its own error text, then resets to $$$OK. (This is useful when testing in a terminal.)
set status = ##class(DH.WatchedStatus).New(“RW”)
set status.sc = (some method that returns a status object)
If the R flag was not given, further error handing by setting this same status will not trigger unless the sc is manually set back to $$$OK.