Programming Guide



raise_exception

Sends an error code back to the client

Synopsis

raise_exception returnCode message

Arguments

returnCode

Specifies the exception error to return to the client for COM components and EJBs.

message

Specifies the message to return to the client for CORBA components.


Environment

COM, EJB

Scope

Server

Description

raise_exception sends an error code back to the client, generally a negative number. The client's error handler can then decide what to do based on the value sent. There are some conventional exception codes defined by Microsoft for use in COM programming.

Calling this command causes the remainder of the JPL to be skipped. The return code from the aborted JPL will be 0.

Example

// This JPL procedure sends an exception code.

proc my_method()
{
. . .
return_args (id, name)
raise_exception -2
}

See Also

receive_args, return_args