JavaScript setTimeoutã§å®è¡ãããé¢æ°ã®ä¸ã§çºçããã¨ã©ã¼ã¯ãã»ããããé¨åã®try/catchã§è£è¶³ãããã¨ã¯ã§ãã¾ããã function throwError(){ throw new Error('ERROR'); } try{ setTimeout(throwError, 3000); } catch(e){ // ããã«ã¯å°éããªã alert(e); } MochiKit.Async.Deferredã使ãã¨ãã¨ã©ã¼ããã¯ã§ã¨ã©ã¼ãè£è¶³ã§ãã¾ãã callLater(3, throwError).addErrback(function(e){ alert(e); }); ã¨ã©ã¼ã®è£è¶³ä»¥å¤ã«ããDeferredã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãã以ä¸ãè¡ãã¾ãã ãã£ã³ã»ã«(cancel)ç¶æ (fired)ã³ã¼ã«ããã¯ã®è¿½å (addCallback)ã¨ã©ã¼ããã¯ã®è¿½å
{{#tags}}- {{label}}
{{/tags}}