Bug with labeled break in catch and finally x

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Mar 20 14:31:16 UTC 2017


Hi,

This seems to be a bug. Thanks for reporting. Please file a bug.

Thanks,
-Sundar

On 20/03/17, 4:04 PM, Zalim Bashorov wrote:
> Hello!
>
> I found the bug in nashorn (1.8.0_121) -- all following functions return
> undefined but should return "OK":
>
> function box1() {
>      label: {
>          try {
>              throw 1;
>          }
>          catch (e) {
>              break label;
>          }
>          throw 2;
>      }
>      return 'OK';
> };
>
> function box2() {
>      label: {
>          try {
>              throw 1;
>          }
>          finally {
>              break label;
>          }
>          throw 2;
>      }
>      return 'OK';
> };
>
> function box3() {
>      label: {
>          try {
>              throw 1;
>          }
>          finally {
>              break label;
>          }
>      }
>      return 'OK';
> };
>
>
> Where can I file an issue about it?
>
> Thanks!
> --
> Best regards,
> Zalim Bashorov
> Developer
> JetBrains
> http://www.jetbrains.com
> The Drive to Develop


More information about the nashorn-dev mailing list