<div dir="ltr">Thank you for your thoughts ! I do agree with you.<div><br></div><div>Dan, do you have any objection to this ?</div><div><br></div><div>Katia</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 5, 2017 at 6:54 PM, Wolf Fink <span dir="ltr">&lt;<a href="mailto:wfink@redhat.com" target="_blank">wfink@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>+1 for Sanne<br></div>I would expect the same and I suppose one or more customers will raise this issue<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 28, 2017 at 12:56 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Personally as a user I&#39;d expect to have a CacheException raised if and<br>
only if it&#39;s not caused by my own code.<br>
<br>
Imagine my own lambda is explicitly throwing an exception of a type of<br>
my choice, it would be nice to receive that error and not a different<br>
one.<br>
<div><div class="m_2420724129146422078h5"><br>
On 28 April 2017 at 11:38, Katia Aresti &lt;<a href="mailto:karesti@redhat.com" target="_blank">karesti@redhat.com</a>&gt; wrote:<br>
&gt; Hi all !<br>
&gt;<br>
&gt; Radim pointed me to this thread discussing the exceptions launched by the<br>
&gt; lambda executed by the user.<br>
&gt;<br>
&gt; So, I&#39;ve came accros this problem right now with the compute method.<br>
&gt;<br>
&gt; ComputeIfAbsent is used by the QueryCache [1]<br>
&gt;<br>
&gt; This method is now a Command, so when the wrapped lambda throws an<br>
&gt; exception, [2], the expected exception is the one raised by the lambda. But<br>
&gt; with my modifications, this exception is wrapped in a CacheException.<br>
&gt;<br>
&gt; I discussed with Adrien yesterday, and IMHO and his, a CacheException is not<br>
&gt; the same thing as the exception raised inside the lambda. Moreover, in this<br>
&gt; particular case, I don&#39;t know if users some code could be broken if we make<br>
&gt; the user get a CacheException that wrappes the ParseException instead of the<br>
&gt; ParseException itself.<br>
&gt;<br>
&gt; How can I fix the problem ?<br>
&gt; Should we correct the tests and say that, from now on, CacheException will<br>
&gt; be raised ?<br>
&gt; Should we handle this CacheException in the QueryCache class when<br>
&gt; computeIfAbsent is called ?<br>
&gt; Should we propagate the lambda&#39;s exception as it is ?<br>
&gt;<br>
&gt; Katia<br>
&gt;<br>
&gt; [1]<br>
&gt; <a href="https://github.com/infinispan/infinispan/blob/master/query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryCache.java#L79" rel="noreferrer" target="_blank">https://github.com/infinispan/<wbr>infinispan/blob/master/query/s<wbr>rc/main/java/org/infinispan/qu<wbr>ery/dsl/embedded/impl/QueryCac<wbr>he.java#L79</a><br>
&gt; [2]<br>
&gt; <a href="https://github.com/infinispan/infinispan/blob/master/query/src/test/java/org/infinispan/query/dsl/embedded/QueryDslConditionsTest.java#L1913" rel="noreferrer" target="_blank">https://github.com/infinispan/<wbr>infinispan/blob/master/query/s<wbr>rc/test/java/org/infinispan/qu<wbr>ery/dsl/embedded/QueryDslCondi<wbr>tionsTest.java#L1913</a><br>
&gt;<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br>
______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/infinispan-dev</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a><br></blockquote></div><br></div>