Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4518

The exception text disappears

    XMLWordPrintableJSON

Details

    • Patch Available
    • Patch

    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 

      } 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

      Attachments

        1. ProcessFunction.java.patch
          0.6 kB
          Anton Shchyrov

        Activity

          People

            Unassigned Unassigned
            AntonTramp Anton Shchyrov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: