title: Spring Cache - How can I catch an exception in unless argument?
body: <p>I get the following code:</p>
  
  <pre><code>@Cacheable(value = "cacheName", key = "#someMap.toString()", unless="#result.error")
  public List&lt;Book&gt; methodName(Map&lt;Integer, Integer&gt; someMap) throws BookException {
  //...
  </code></pre>
  
  <p>The method throws <em>BookException</em> and I want avoid caching the result when this occurs. But when I execute the method:</p>
  
  <pre><code>org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'error' cannot be found on object of type 'java.util.ArrayList' - maybe not public?
  </code></pre>