Merged HEAD (5.2) to 5.2.N (5.2.1)

127571 jkaabimofrad: Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2)
      126242 gjames: RA-878:All api errors should return the standard error object


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127665 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-03 14:14:04 +00:00
parent 4521ecaed9
commit b2fe847b6c
24 changed files with 364 additions and 236 deletions

View File

@@ -86,8 +86,8 @@ public class NetworksWebScriptGet extends ApiWebScript
// apply content type
res.setContentType(Format.JSON.mimetype() + ";charset=UTF-8");
jsonHelper.withWriter(res.getOutputStream(), new Writer()
assistant.getJsonHelper().withWriter(res.getOutputStream(), new Writer()
{
@Override
public void writeContents(JsonGenerator generator, ObjectMapper objectMapper)
@@ -114,17 +114,13 @@ public class NetworksWebScriptGet extends ApiWebScript
}
}, true, true);
}
catch (ApiException apiException)
catch (ApiException | WebScriptException apiException)
{
renderErrorResponse(resolveException(apiException), res);
}
catch (WebScriptException webException)
{
renderErrorResponse(resolveException(webException), res);
assistant.renderException(apiException, res);
}
catch (RuntimeException runtimeException)
{
renderErrorResponse(resolveException(runtimeException), res);
assistant.renderException(runtimeException, res);
}
}
}