[jira] [Updated] (THRIFT-4518) The exception text disappears

2018-03-13 Thread Anton Shchyrov (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Shchyrov updated THRIFT-4518:
---
Description: 
When the server method throws an exception TException, only the string 

"Internal error processing \{MethodName}"

and does not reach the original message. Problem in the module 
ProcessFunction.java. Instead of a code 
{code:java}
} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway()){
  result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
         "Internal error processing " + getMethodName());
      msgType = TMessageType.EXCEPTION;
  }
} 
{code}
There should be a code of

 
{code:java}
} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway()){
     result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
        String.format("Internal error processing. Method: %s, message: %s", 
getMethodName(), ex.getMessage()));        msgType = TMessageType.EXCEPTION;
   }
}
{code}
 

In the server written on Delphi such problem is not present and there the text 
of an exception is transferred correctly

  was:
When the server method throws an exception TException, only the string 

"Internal error processing \{MethodName}"

and does not reach the original message. Problem in the module 
ProcessFunction.java. Instead of a code

 
{code:java}
} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway()){
result = new TApplicationException(TApplicationException.INTERNAL_ERROR,    
     "Internal error processing " + getMethodName());     msgType = 
TMessageType.EXCEPTION;
  }
} 
{code}
There should be a code of

} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway())

{     result = new TApplicationException(TApplicationException.INTERNAL_ERROR,  
      String.format("Internal error processing. Method: %s, message: %s", 
getMethodName(), ex.getMessage()));     msgType = TMessageType.EXCEPTION;   }

}

In the server written on Delphi such problem is not present and there the text 
of an exception is transferred correctly


> The exception text disappears
> -
>
> Key: THRIFT-4518
> URL: https://issues.apache.org/jira/browse/THRIFT-4518
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: Anton Shchyrov
>Priority: Major
>  Labels: exception, exception-handling, patch, server
> Attachments: ProcessFunction.java.patch
>
>
> When the server method throws an exception TException, only the string 
> "Internal error processing \{MethodName}"
> and does not reach the original message. Problem in the module 
> ProcessFunction.java. Instead of a code 
> {code:java}
> } catch (Exception ex) {
>    LOGGER.error("Internal error processing " + getMethodName(), ex);
>    if(!isOneway()){
>   result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
>          "Internal error processing " + getMethodName());
>       msgType = TMessageType.EXCEPTION;
>   }
> } 
> {code}
> There should be a code of
>  
> {code:java}
> } catch (Exception ex) {
>    LOGGER.error("Internal error processing " + getMethodName(), ex);
>    if(!isOneway()){
>      result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
>         String.format("Internal error processing. Method: %s, message: %s", 
> getMethodName(), ex.getMessage()));        msgType = TMessageType.EXCEPTION;
>    }
> }
> {code}
>  
> In the server written on Delphi such problem is not present and there the 
> text of an exception is transferred correctly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (THRIFT-4518) The exception text disappears

2018-03-13 Thread Anton Shchyrov (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Shchyrov updated THRIFT-4518:
---
Description: 
When the server method throws an exception TException, only the string 

"Internal error processing \{MethodName}"

and does not reach the original message. Problem in the module 
ProcessFunction.java. Instead of a code

 
{code:java}
} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway()){
result = new TApplicationException(TApplicationException.INTERNAL_ERROR,    
     "Internal error processing " + getMethodName());     msgType = 
TMessageType.EXCEPTION;
  }
} 
{code}
There should be a code of

} catch (Exception ex) {
   LOGGER.error("Internal error processing " + getMethodName(), ex);
   if(!isOneway())

{     result = new TApplicationException(TApplicationException.INTERNAL_ERROR,  
      String.format("Internal error processing. Method: %s, message: %s", 
getMethodName(), ex.getMessage()));     msgType = TMessageType.EXCEPTION;   }

}

In the server written on Delphi such problem is not present and there the text 
of an exception is transferred correctly

  was:
When the server method throws an exception TException, only the string 

"Internal error processing \{MethodName}"

and does not reach the original message. Problem in the module 
ProcessFunction.java. Instead of a code

} catch (Exception ex) {
  LOGGER.error("Internal error processing " + getMethodName(), ex);
  if(!isOneway()) {
    result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
        "Internal error processing " + getMethodName());
    msgType = TMessageType.EXCEPTION;
  }
}

There should be a code of

} catch (Exception ex) {
  LOGGER.error("Internal error processing " + getMethodName(), ex);
  if(!isOneway()) {
    result = new TApplicationException(TApplicationException.INTERNAL_ERROR,
       String.format("Internal error processing. Method: %s, message: %s", 
getMethodName(), ex.getMessage()));

    msgType = TMessageType.EXCEPTION;
  }
}

In the server written on Delphi such problem is not present and there the text 
of an exception is transferred correctly


> The exception text disappears
> -
>
> Key: THRIFT-4518
> URL: https://issues.apache.org/jira/browse/THRIFT-4518
> Project: Thrift
>  Issue Type: Bug
>  Components: Java - Library
>Affects Versions: 0.11.0
>Reporter: Anton Shchyrov
>Priority: Major
>  Labels: exception, exception-handling, patch, server
> Attachments: ProcessFunction.java.patch
>
>
> When the server method throws an exception TException, only the string 
> "Internal error processing \{MethodName}"
> and does not reach the original message. Problem in the module 
> ProcessFunction.java. Instead of a code
>  
> {code:java}
> } catch (Exception ex) {
>    LOGGER.error("Internal error processing " + getMethodName(), ex);
>    if(!isOneway()){
> result = new TApplicationException(TApplicationException.INTERNAL_ERROR,  
>        "Internal error processing " + getMethodName());     msgType = 
> TMessageType.EXCEPTION;
>   }
> } 
> {code}
> There should be a code of
> } catch (Exception ex) {
>    LOGGER.error("Internal error processing " + getMethodName(), ex);
>    if(!isOneway())
> {     result = new 
> TApplicationException(TApplicationException.INTERNAL_ERROR,        
> String.format("Internal error processing. Method: %s, message: %s", 
> getMethodName(), ex.getMessage()));     msgType = TMessageType.EXCEPTION;   }
> }
> In the server written on Delphi such problem is not present and there the 
> text of an exception is transferred correctly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)