Skip to content

Example test/calculator throws error #76

Description

@verseve

Hi @tanmaykm,

With Thrift.jl-0.8.4 on Windows the example test\calculator throws the following error listed at the end of this comment (in the file srvr.jl I did change symbol to Symbol). With Thrift.jl-0.7.1 the example works fine, however when an error is forced, this is the output:

┌ Error: exception serving request
│   exception =
│    required field oper not populated
│    Stacktrace:
│      [1] error(s::String)
│        @ Base .\error.jl:33
│      [2] write_container(p::TBinaryProtocol, val::InvalidFloatOperation)

It seems the handling of user-defined exceptions is not working properly ?

We would like to use Thrift.jl where Wflow.jl runs as a server, and run in the same issue with user-defined exceptions.

julia> include("srvr.jl")
[ Info: Precompiling Thrift [8d9c9c80-f77e-5080-9541-c6f69d204e22]
starting julia server...
┌ Error: exception serving request
│   exception =
│    required field ouch not populated
│    Stacktrace:
│      [1] error(s::String)
│        @ Base .\error.jl:33
│      [2] write_container(p::TBinaryProtocol, val::calculate_result_Calc)
│        @ Thrift d:\Thrift.jl-0.8.4\src\base.jl:224
│      [3] write
│        @ d:\Thrift.jl-0.8.4\src\base.jl:216 [inlined]
│      [4] _reply(outp::TBinaryProtocol, name::String, seqid::Int32, mtyp::Int32, m::calculate_result_Calc)
│        @ Thrift d:\Thrift.jl-0.8.4\src\processor.jl:25
│      [5] _process(p::ThriftProcessor, inp::TBinaryProtocol, outp::TBinaryProtocol, name::String, typ::Int32, seqid::Int32)
│        @ Thrift d:\Thrift.jl-0.8.4\src\processor.jl:62
│      [6] process(p::ThriftProcessor, inp::TBinaryProtocol, outp::TBinaryProtocol)
│        @ Thrift d:\Thrift.jl-0.8.4\src\processor.jl:37
│      [7] process(p::CalcProcessor, inp::TBinaryProtocol, outp::TBinaryProtocol)
│        @ Main d:\Thrift.jl-0.8.4\test\calculator\gen-jl\arithmetic\Calc.jl:116
│      [8] serve_accepted(client::TSocket, s::Thrift.TServerBase)
│        @ Thrift d:\Thrift.jl-0.8.4\src\server.jl:19
│      [9] serve(ss::TSimpleServer)
│        @ Thrift d:\Thrift.jl-0.8.4\src\server.jl:46
│     [10] calcsrvr()
│        @ Main d:\Thrift.jl-0.8.4\test\calculator\srvr.jl:38
│     [11] top-level scope
│        @ d:\Thrift.jl-0.8.4\test\calculator\srvr.jl:42
│     [12] include(fname::String)
│        @ Base.MainInclude .\client.jl:444
│     [13] top-level scope
│        @ REPL[2]:1
│     [14] eval

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions