Sampling libraries cannot raise exceptions, but you can specify a user notification event number if you want to subscribe to an exception in a sampling library.
If an error occurs in the sampling library, a user notification event is caused on the
SamplingExceptionEvent user-notification-event-number
In this format, the user-notification-event-number must be in the range User_Base_Event through User_Max_Event of the global constants in the
Global Constant | Integer Value |
---|---|
User_Base_Event | 16 |
User_Max_Event | Max_Integer (#7FFFFFFF, equates to 2147483647) |
If you subscribe to a sampling exception event by using the SamplingExceptionEvent and an exception occurs in the sampling library, an event is caused on the Node object to notify the subscriber that a sampling exception occurred. Sampling for that node is then terminated.
The userInfo parameter in the
SAMPLING_OPEN_FAILED (1), indicating that the opening of the connection or file failed
SAMPLING_WRITE_FAILED (2), for example, the disk is full or the connection lost
Sampling for the current session is terminated, regardless of whether an exception event was caused (that is, if you subscribed to a sampling exception by specifying a user notification event number in the command parameter of the