On Dec 19, 7:46 pm, Alibek <
alibek.jor...@gmail.com> wrote:
> Hello !
>
> can someone help me - is there easy way to detect whether last "}"
> statement is reachable?
There is no easy way to do reachability analysis. Search for "code
reachability analysis" and you'll get a lot of articles that will get
you started with this.
But there is an easier way to achieve the desired effect. Generate
code that wraps the method body in try...catch...finally, initialize a
flag before try, modify it in catch, an rethrow, in finally check the
flag and have the code you'd want yo run on each return.
--
lego