Skip to content

Commit

Permalink
allow parsing exceptions in failure
Browse files Browse the repository at this point in the history
  • Loading branch information
arun3688 committed Aug 27, 2019
1 parent 5a403e6 commit ef2c272
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/OMJulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,14 @@ mutable struct OMCSession
end
end

function sendExpression(omc, expr)
function sendExpression(omc, expr, parsed=true)
ZMQ.send(omc.socket, expr)
message=ZMQ.recv(omc.socket)
return Parser.parseOM(unsafe_string(message))
if parsed
return Parser.parseOM(unsafe_string(message))
else
return unsafe_string(message)
end
end

end

0 comments on commit ef2c272

Please sign in to comment.