Informix Error -4128
-4128 Handler should be a member of either the same class, or else
a base class, of the object.The indicated handler is declared in the program but is not a member of same class as the object or of a base class from which the object is derived.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4128 fires when a handler used in a HANDLE statement isn't a member of the same class as
the target object, or of a base class it derives from — per the official guidance, the handler
must belong to that class or one of its ancestors.
- The handler is declared as a member of an unrelated class, per the official guidance — the direct, only cause.
Solutions / Resolution
- Declare the handler as a member of the object's own class, or one of its base classes.
Examples
A handler from an unrelated class
CLASS Order
...
END CLASS
CLASS UnrelatedClass
HANDLER myHandler
...
END HANDLER
END CLASS
DEFINE o Order
HANDLE MyEvent WITH myHandler
-- -4128: myHandler belongs to UnrelatedClass, not Order or one of its bases
Corrected
CLASS Order
HANDLER myHandler
...
END HANDLER
END CLASS
Diagnostic Checks
- Check which class the handler is declared in, and confirm it's the target object's own class or a base class of it.
Related Errors / Related Topics
- -4126 — "Handler expected." A related handler-declaration error, about the
WITHidentifier not being a handler at all, rather than a valid handler in the wrong class.
The handler belongs to a class unrelated to the target object — move it to the object's own class or one of its base classes.