7. ASOLib—OpenROAD Server Library : ASOLib User Classes : uc_osca (OpenROAD Server) : ReturnWithUserError Method (OpenROAD Server)
 
Share this page                  
ReturnWithUserError Method (OpenROAD Server)
This method is invoked when the OpenROAD Server program needs to report an application error (a soft error) to the calling client. Error details are stored within the uc_osca instance, and the application is exited immediately.
Note:  The entry SCP is protected by an exit trap to prevent the OpenROAD Server from shutting down completely. (All GSCPs are automatically protected by such an exit trap.)
Parameters:
(p_i_error_no = integer,
 p_v_msg_txt = varchar(512))
Return Data Type: Not applicable—this method causes the application to exit.
Example—ReturnWithUserError Method:
IF i_bank_balance < 0 THEN
    OSCA.ReturnWithUserError (p_i_error_no = 101,
                              p_v_msg_txt  = 'Account is overdrawn');
    /* control never reaches here */
ENDIF;