Implementing Exceptions
PeopleSoft delivers a baseException class providing the default exception handling, which is on the PeopleTools exception class. The baseException class constructor takes the following parameters:
-
An instance of a service log.
-
A message set number and message number.
-
Default message text.
-
Message parameters 1–5 or "Null" when none.
The base Exception class constructor executes the following logic:
-
Adds PSMessages collection to the service log.
-
Creates a PeopleTools exception for the provided message set and message number.
To implement a registered type interface:
Note:
Implement registered exceptions as PeopleCode application classes.
-
In Application Designer, create an application package for each functional module using the naming convention <NAMESPACE_PREFIX>_EXCEPTIONS.
Use the first level sub-package to group implementation classes by function and the second level to group classes by versions.
-
Copy the stub code the system created when you clicked the Generate Class Code button on the Registry Wizard - Implementation page for this interface and paste it into the application class implementing the exception.
-
Confirm that the exception implementation contains the following:
-
A link to an entry in the PeopleTools message catalog.
-
Default error processing.
-
Exception-specific error processing, where necessary.
Note:
The exception's registry entry defines the exception name, the fault message structure, and the exception semantics (description).
-
-
Confirm that the implementation of the exception class:
-
Name is identical to the registry entry name.
-
Extends the baseException and import the baseException class definition.
-
Contains a constructor that:
— Takes an instance of a LogType as a single parameter and imports the LogType class definition.
— Facilitates the default error processing by wan of an instance of a parent class.
— Assigns the correct IUD of the corresponding registry entry to its IUD property.
-
Exposes a read-only property IUD with a type of string.
-