MSCEWI4025
ERROR_SEVERITY function transformed
Low
This EWI is added when ERROR_SEVERITY built-in function is translated. By default, the function will return 16 as it is the most common severity in SQL Server. The generated UDF should retrie
CREATE procedure proc1()
as
BEGIN TRY
-- Generate a divide-by-zero error.
SELECT 1/0 from table1;
END TRY
BEGIN CATCH
return ERROR_SEVERITY();
END CATCH;
GO
CREATE OR REPLACE PROCEDURE proc1 ()
RETURNS STRING
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS
$$
// REGION SnowConvert Helpers Code
// END REGION
try {
EXEC(` -- Generate a divide-by-zero error.
SELECT 1/0 from PUBLIC.table1`);
} catch(error) {
return SELECT(`/*** MSC-WARNING - MSCEWI4025 - CUSTOM UDF 'ERROR_SEVERITY_UDF' INSERTED FOR ERROR_SEVERITY FUNCTION. ***/
ERROR_SEVERITY_UDF()`);
}
$$;
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
--GO
- For more support, you can email us at [email protected] or post a message to our forums. If you have a contract for support with Mobilize.Net, reach out to your sales engineer and they can direct your support needs.
Last modified 1yr ago