Firefoxã§ã¯catchã«æ¡ä»¶å¼ãæ¸ããã®ã§ã以ä¸ã®ããã«ä¾å¤ã®åãæå®ã§ãã¾ãã
var Exception1 = function() { }; var Exception2 = function() { }; try { // throw new Exception1(); throw new Exception2(); } catch(e if e.constructor == Exception1) { alert('catch Exception1'); } catch(e if e.constructor == Exception2) { alert('catch Exception2'); }
ãããIEãOperaãªã©ã§ããããããã§ããã©ãã©ãããã°ãããã§ãããï¼ãã¯ãä¸ã¤ã®catch(e)ãç¨æãã¦ãifã§æ¯ãåãããã§ããããã