Handling Exceptions

SSOLite stored procedures raise an Oracle error in the range -20000 to -20020 if any procedure fails. Note that:

The error text is always preceded by the string (SWERROR).
Each error has a unique ID, which is displayed at the end of the error text.

It is the application’s responsibility to handle any such database exceptions, and issue a rollback if appropriate.

The following table describes the different errors (and their unique IDs) that may be returned by the SSOLite stored procedures.

Note: Some of the stored procedures listed in the table are not described in this section. These are lower level stored procedures that may be called by some or all of the stored procedures that are described in this section.

Stored Procedure

Oracle Error

Error Text

SW_GET_NODE_DETAILS

-20001

Node details not found in database (ID:001007)

SW_SET_QUEUE_NAME

20002

MBox Queue Name(s) not found in database (ID:001008)

SW_GET_PROCEDURE

-20003

Procedure details not found in database for procedure name=proc_name (ID:001010)

-20000

Procedure version not found in database for procedure name=proc_name, Case Num=case_num (ID:001011)

-20004

Latest Released or Unreleased Procedure version not found in database for procedure name=proc_name (ID:001012)

-20005

Procedure version not found in database for procedure name=proc_name major_version minor_version (ID:001013)

SW_SUSPEND

-20000

Suspend type (suspend_type) is invalid, expected 2 (suspend) or 0 (activate) (ID:001014)

-20000

Case (case_num) is already active (ID:001036)

-20000

Case (case_num) is dead (ID:001037)

-20000

Case (case_num) is already suspended (ID:001038)

SW_GET_SUBPROC_DETAILS

-20000

Sub-Proc casenum not found in database for Procedure proc_name, Case Number case_num, Step Name step_name, Sub-proc sub_proc_name (ID:001018)

SW_GETCASE_STATUS_EX

-20006

Failed to find case information for case: case_num (ID:001019)

SW_UNPACKDELAYRELEASEID

-20000

Unexpected inconsistency between node name nodename and delayed release id procedure node name nodename (ID:001020)

-20000

Unexpected inconsistency between node name nodename and delayed release id queue node name nodename (ID:001021)

SW_DELAYED_RELEASE_ERR

-20000

Failed to get node ID (ID:001022)

SW_PURGE

-20006

Case (case_num) is dead (ID:001037)

-20006

Procedure and case information does not match (ID:001041)

-20006

Case (case_num) is dead (ID:001037)

-20006

Procedure and case information does not match (ID:001042)