Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function foo() {
- // この関数からの例外は下記catchで捕まえられる
- }
- try {
- foo();
- document.addEventListener(‘load’, function(e) {
- // この関数はcatchまでに実行されないので、
- // 例外は下記catchで捕まえられない
- });
- } catch (e) {
- // …
- }
- window.addEventListener(‘error’, function(e) {
- // e.error が例外
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement