Informix Error -4065
-4065 Multiple exception handlers for the same exception class "name".
Two or more ON EXCEPTION statements exist for the same exception class in this block. Only one can be invoked. Review the statements, make sure that each specifies the correct exception class, and remove or combine duplicate handlers.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4065 fires when a block has two or more ON EXCEPTION statements for the same exception
class — per the official guidance, only one handler can actually be invoked for a given
exception class.
- More than one
ON EXCEPTIONstatement for the same exception class in one block, per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the statements and confirm each specifies the correct exception class, per the official guidance.
- Remove or combine duplicate handlers, per the official guidance.
Examples
Duplicate exception handlers
ON EXCEPTION IN (SqlException)
...
END EXCEPTION
ON EXCEPTION IN (SqlException)
-- -4065: SqlException already has a handler above
END EXCEPTION
Corrected
ON EXCEPTION IN (SqlException)
...
END EXCEPTION
Diagnostic Checks
- Check every block for more than one
ON EXCEPTIONhandler naming the same exception class, and combine or remove the duplicates.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4065 in this set yet.
A block has more than one exception handler for the same exception class — combine or remove the duplicate.