Skip to content

Commit

Permalink
CA-96872: Fix marshalling of exceptions
Browse files Browse the repository at this point in the history
Api_errors are of type string * string list, but they are actually
marshalled as just a string list

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
  • Loading branch information
Jon Ludlam committed Jan 16, 2013
1 parent ff40395 commit 75ce056
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ocaml/idl/ocaml_backend/gen_api.ml
Expand Up @@ -132,11 +132,11 @@ let gen_client_types highapi =
(List.between [""] [
[ "open Date" ];
[
"type failure = string * (string list) with rpc";
"type failure = (string list) with rpc";
"let response_of_failure code params =";
" Rpc.failure (rpc_of_failure (code, params))";
" Rpc.failure (rpc_of_failure (code::params))";
"let response_of_fault code =";
" Rpc.failure (rpc_of_failure (\"Fault\", [code]))";
" Rpc.failure (rpc_of_failure ([\"Fault\"; code]))";
]; [
"include Rpc";
"type string_list = string list with rpc";
Expand Down

0 comments on commit 75ce056

Please sign in to comment.