diff --git a/AUTHORS.md b/AUTHORS.md index c18f050f..381f7e4f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -78,3 +78,7 @@ Trevor Vannoy Ranganathan Balakrishnan + add JSON NUMERIC data type to accept both real and integer values + +Evgeny Petrov ++ added data field for error handler ++ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c867af0e..0fb790f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Build example for Centos 7 (#267) - `Json::Value` example code (#281) - IPv6 Support for `HttpServer` (#275) +- Added data field in error handler in JS stub generator ### Fixed - Incorrect README sections (#280) diff --git a/src/stubgenerator/client/jsclientstubgenerator.cpp b/src/stubgenerator/client/jsclientstubgenerator.cpp index f038caf3..5e3b0fcf 100644 --- a/src/stubgenerator/client/jsclientstubgenerator.cpp +++ b/src/stubgenerator/client/jsclientstubgenerator.cpp @@ -39,7 +39,7 @@ using namespace std; callback_success(response.id, response.result);\n\ } else if (response.hasOwnProperty(\"error\")) {\n\ if (callback_error != null)\n\ - callback_error(response.error.code,response.error.message);\n\ + callback_error(response.error.code,response.error.message,response.error.data);\n\ } else {\n\ if (callback_error != null)\n\ callback_error(-32001, \"Invalid Server response: \" + response);\n\