From d204863c1f7b50f0cddaf4d71b9f043917bd3211 Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Fri, 11 Oct 2024 17:49:31 +0530 Subject: [PATCH] Relpace throwable with exception --- .../stdlib/sql/nativeimpl/OutParameterProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java index 357e83d5..a0ff03ba 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java @@ -64,7 +64,7 @@ private OutParameterProcessor() { public static Object getOutParameterValue(BObject result, BTypedesc typeDesc) { try { CallProcessor.populateOutParameter(result); - } catch (Throwable e) { + } catch (SQLException | ApplicationError e) { return ErrorGenerator.getSQLError(e, "Failed to read OUT parameter value."); } @@ -74,7 +74,7 @@ public static Object getOutParameterValue(BObject result, BTypedesc typeDesc) { public static BStream getOutCursorValue(BObject result, BTypedesc typeDesc) { try { CallProcessor.populateOutParameter(result); - } catch (Throwable e) { + } catch (SQLException | ApplicationError e) { return getErrorStream(typeDesc, ErrorGenerator.getSQLError(e, "Failed to read parameter value.")); } @@ -84,7 +84,7 @@ public static BStream getOutCursorValue(BObject result, BTypedesc typeDesc) { public static Object getInOutParameterValue(BObject result, BTypedesc typeDesc) { try { CallProcessor.populateOutParameter(result); - } catch (Throwable e) { + } catch (SQLException | ApplicationError e) { return ErrorGenerator.getSQLError(e, "Failed to read INOUT parameter value."); } return get(result, typeDesc, DefaultResultParameterProcessor.getInstance(), "InOutParameter");