[ 
https://issues.apache.org/jira/browse/IGNITE-21817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17829760#comment-17829760
 ] 

Roman Puchkovskiy commented on IGNITE-21817:
--------------------------------------------

The patch looks good to me

> CriteriaException must keep error code for mapping from SqlException 
> ---------------------------------------------------------------------
>
>                 Key: IGNITE-21817
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21817
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Andrey Novikov
>            Assignee: Andrey Novikov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Current implementation of 
> CriteriaExceptionMapperUtil#mapToPublicCriteriaException
> {code:java}
> public static Throwable mapToPublicCriteriaException(Throwable origin) {
> Throwable e = mapToPublicException(origin);
> if (e instanceof Error) {
> return e;
> }
> if (e instanceof CriteriaException) {
> return e;
> }
> if (e instanceof SqlException) {
> return new CriteriaException(INTERNAL_ERR, e);
> }
> ...{code}
> It looks like we doesn't need to map all SqlException to CriteriaException 
> with errorCode = INTERNAL_ERR



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to