فهرست منبع

Add expression string to failed expression evaluation exception message to help clarify the context.

Luke Taylor 16 سال پیش
والد
کامیت
897960cd70
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      core/src/main/java/org/springframework/security/access/expression/ExpressionUtils.java

+ 1 - 1
core/src/main/java/org/springframework/security/access/expression/ExpressionUtils.java

@@ -10,7 +10,7 @@ public final class ExpressionUtils {
         try {
             return ((Boolean) expr.getValue(ctx, Boolean.class)).booleanValue();
         } catch (EvaluationException e) {
-            throw new IllegalArgumentException("Failed to evaluate expression", e);
+            throw new IllegalArgumentException("Failed to evaluate expression '" + expr.getExpressionString() + "'", e);
         }
     }
 }