olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chri...@apache.org
Subject olingo-odata4 git commit: [OLINGO-979] corrected localized error message
Date Thu, 14 Jul 2016 11:47:54 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/master a6bde3bee -> e916006e2


[OLINGO-979] corrected localized error message

Signed-off-by: Christian Amend <christian.amend@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/e916006e
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/e916006e
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/e916006e

Branch: refs/heads/master
Commit: e916006e27f73e8469a3f20d5f7dfe7c9dbad372
Parents: a6bde3b
Author: Morten Riedel <Morten.Riedel@sap.com>
Authored: Thu Jul 14 13:14:36 2016 +0200
Committer: Christian Amend <christian.amend@sap.com>
Committed: Thu Jul 14 13:33:36 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/olingo/server/core/ODataExceptionHelper.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e916006e/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java
b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java
index e5117cd..f409903 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataExceptionHelper.java
@@ -132,6 +132,7 @@ public class ODataExceptionHelper {
     serverError.setStatusCode(e.getStatusCode());
     serverError.setLocale(e.getLocale());
     serverError.setCode(e.getODataErrorCode());
+    serverError.setMessage(e.getLocalizedMessage());
     return serverError;
   }
 
@@ -143,7 +144,7 @@ public class ODataExceptionHelper {
   }
 
   private static ODataServerError basicServerError(final Exception e) {
-    ODataServerError serverError = new ODataServerError().setException(e).setMessage(e.getLocalizedMessage());
+    ODataServerError serverError = new ODataServerError().setException(e).setMessage(e.getMessage());
     if (serverError.getMessage() == null) {
       serverError.setMessage("OData Library: An exception without message text was thrown.");
     }


Mime
View raw message