{"action":"created","issue":{"url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/9","repository_url":"https://api.github.com/repos/mamod/JavaScript-Duktape","labels_url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/9/comments","events_url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/9/events","html_url":"https://github.com/mamod/JavaScript-Duktape/issues/9","id":143485674,"number":9,"title":"strange try-tiny interaction results in blank $@","user":{"login":"rodrigolive","id":120099,"avatar_url":"https://avatars.githubusercontent.com/u/120099?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigolive","html_url":"https://github.com/rodrigolive","followers_url":"https://api.github.com/users/rodrigolive/followers","following_url":"https://api.github.com/users/rodrigolive/following{/other_user}","gists_url":"https://api.github.com/users/rodrigolive/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigolive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigolive/subscriptions","organizations_url":"https://api.github.com/users/rodrigolive/orgs","repos_url":"https://api.github.com/users/rodrigolive/repos","events_url":"https://api.github.com/users/rodrigolive/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigolive/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-03-25T12:03:32Z","updated_at":"2016-03-31T09:56:45Z","closed_at":"2016-03-27T17:32:08Z","body":"The problem here is that a try-catch wrapped `$js->eval()` will not get the error message rethrown in the `catch { die $err }`. \r\n\r\nThis did not occur with v0.3.0, only with the new error correction pushed to the `master` branch.\r\n\r\nHere's the code:\r\n\r\n    use strict;\r\n    use warnings;\r\n    use JavaScript::Duktape;\r\n    use Try::Tiny;\r\n\r\n    try {\r\n        eval_js(q{\r\n            throw new Error('oh boy!');\r\n        });\r\n    } catch {\r\n        my $err = shift;\r\n        warn \"TRY-TINY ERR=$err\"; #### $err is blank!?!\r\n    };\r\n\r\n    eval {\r\n        eval_js(q{\r\n            throw new Error('oh boy!');\r\n        });\r\n    };\r\n    warn \"EVAL ERR=$@\"; ###### blank again!?!\r\n\r\n    sub eval_js {\r\n        my $code = shift;\r\n\r\n        my $js= JavaScript::Duktape->new;\r\n\r\n        try {\r\n            $js->eval( $code );\r\n        } catch {\r\n            my $err = $_;\r\n            warn \"CAUGHT ERR: $err\";\r\n            die \"JS ERR: $err\";\r\n        };\r\n    }\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/comments/203858525","html_url":"https://github.com/mamod/JavaScript-Duktape/issues/9#issuecomment-203858525","issue_url":"https://api.github.com/repos/mamod/JavaScript-Duktape/issues/9","id":203858525,"user":{"login":"rodrigolive","id":120099,"avatar_url":"https://avatars.githubusercontent.com/u/120099?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigolive","html_url":"https://github.com/rodrigolive","followers_url":"https://api.github.com/users/rodrigolive/followers","following_url":"https://api.github.com/users/rodrigolive/following{/other_user}","gists_url":"https://api.github.com/users/rodrigolive/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigolive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigolive/subscriptions","organizations_url":"https://api.github.com/users/rodrigolive/orgs","repos_url":"https://api.github.com/users/rodrigolive/repos","events_url":"https://api.github.com/users/rodrigolive/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigolive/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T09:56:45Z","updated_at":"2016-03-31T09:56:45Z","body":"Hey Mamod, when are you planning to release 1.0.0 to CPAN? I'm eager to install it the official way. \r\nthanks!"}}