DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

SaMakeObjectCall(TCL_ADM)


SaMakeObjectCall -- perform object calls returing a list of BMIP responses

Syntax

SaMakeObjectCall objectCall

Description

SaMakeObjectCall performs an object call returning a list of BMIP responses. In some cases, direct object operations result in OSA or framework errors that throw stacks rather than returning a BMIP response containing the stack. SaMakeObjectCall handles such cases by building and returning a BMIP response in order to give the application an even more consistent interface.

When unrecognized errors are thrown, SaMakeObjectCall will throw as well, leaving the burden on the application itself. These are rare cases and most likely indicate a serious coding error in the OSA.

Arguments


objectCall
a properly formatted SCOadmin object operation.

Return values

A list of 0 or more BMIP responses. Callers can check for the presense of an error stack in each BMIP response using BmipResponseErrorIsPresent.

Errors

Most errors will generate an error stack that is returned with a BMIP response. In the case of a list of two or more BMIP responses, (such as an object operation on multiple objects) it is possible that only a subset of BMIP responses contain error stacks. The caller should iterate through the list checking each BMIP response.

SaMakeObjectCall can throw an error in the event of an unrecognized throw from a lower level (framework or OSA). SaMakeObjectCall should be used in conjunction with ErrorCatch either at the same or higher level.

Examples

# build the object operation
set objCall [list ObjectCreate [list sco $class] $instance $attrs]

# make the call set bmipList [SaMakeObjectCall $objCall]

# iterate through the list of bmip's foreach bmip $bmipList {

# did we get an error? if [BmipResponseErrorIsPresent $bmip] { ErrorThrow [BmipResponseErrorStack bmip] }

# successful operation process bmip . . . }

See also

Bmip(TCL_ADM), Object(TCL_ADM).
16 September 2002
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003