RESULT_EXCEPTION and RESULT_CORRALLED in ExecutionControl
Robert Field
robert.field at oracle.com
Mon Apr 11 20:23:35 UTC 2016
Corralling --
If I enter:
void m() { f(); }
and f() isn't defined, I'll get:
| Added method m(), however, it cannot be invoked until method f()
is declared
under the sheets that means it has been compiled as:
void m() { throw new RemoteResolutionException(46); }
Where , for example,46 identifies the snippet for method m().
Other code can now happily reference m():
void mm() { m(); m(); }
But if, at runtime, m() gets executed, it will throw the
RemoteResolutionException, which, in turn, will cause RESULT_CORRALLED
to be sent across the wire (with the id info). So that it will be
reported as:
-> mm()
| Attempted to call method m() which cannot be invoked until method
f() is declared
ExecutionControl deals only with execution never compilation.
-Robert
On 04/11/16 13:11, Grigory Ptashko wrote:
> Do I understand it right that this is the snippet “compile time” exception and is
> thrown only when a snippet cannot be compiled?
>
>> On 11 апр. 2016 г., at 18:45, Robert Field <robert.field at oracle.com> wrote:
>>
>> RESULT_CORRALLED is for attempts to executed corralled code (that is code with unresolved references), isn't handled like a user exception. Is passed different arguments.
>>
>> -Robert
>>
>> On 04/11/16 05:10, Grigory Ptashko wrote:
>>> Hello.
>>>
>>> I need some explanation on ExecutionControl.
>>> Namely, what is the difference between
>>>
>>> RESULT_EXCEPTION and RESULT_CORRALLED?
>>>
>>> Why is RESULT_EXCEPTION not enough?
>>>
>>> Thank you.
>>>
>>> --
>>> Best regards,
>>> Grigory Ptashko
>>>
>>> +7 (916) 1489766
>>> grigory.ptashko at gmail.com
>>> facebook.com/GrigoryPtashko
>>>
>
> --
> Best regards,
> Grigory Ptashko
>
> +7 (916) 1489766
> grigory.ptashko at gmail.com
> facebook.com/GrigoryPtashko
>
More information about the kulla-dev
mailing list