MSCEWI3051
PRAGMA EXCEPTION_INIT is not supported.
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
This warning is added when PRAGMA EXCEPTION_INIT function is invoked within a procedure. When the procedure is transformed to JavaScript, the Exception Name and SQL Code of the exceptions are set in the RAISE function. When it is converted to Snowflake Scripting, the SQL Code is added to the Exception declaration, however, some code values may be invalid in Snowflake Scripting.
Example Code
Input Code:
CREATE OR REPLACE PROCEDURE EXCEPTION_DECLARATION_SAMPLE AUTHID DEFINER IS
NEW_EXCEPTION EXCEPTION;
PRAGMA EXCEPTION_INIT(NEW_EXCEPTION, -63);
NEW_EXCEPTION2 EXCEPTION;
PRAGMA EXCEPTION_INIT ( NEW_EXCEPTION2, -20100 );
BEGIN
IF true THEN
RAISE NEW_EXCEPTION;
END IF;
EXCEPTION
WHEN NEW_EXCEPTION THEN
--Handle Exceptions
NULL;
END;
/Output Code:
JavaScript
Snowflake Scripting
Recommendations
No end-user action is required.
If you need more support, you can email us at [email protected]
Last updated
